Here is my problem:
I need to create an interface, where a user could see a low-quality version of a PDF page, and choose a place to drop a small image onto. After that, I need to get the page number and the coordinates of the top-left corner and the bottom-right corner. I also need to make sure, that there is no way to move the image outside of the PDF.
What I could come up on my own, was to somehow convert the PDF to a bunch of images, which I could then show, and change pages, by just loading the image for the next page. And I could then create some sort of draggable on top of that, and read the coordinates.
So could anyone tell me how to get this done?
As a bonus, could someone help me with some tutorials, links and the sort, to resources that could help me with this?
From where I stand, this could be VERY interesting, but also very resource intensive, since the PDF's should be converted on the fly. Can it be done page by page?
Some technical specs:
Max file size - 4Mb, so the PDF wouldn't be awfully big
Min API - 8. I need it to work on Android 2.2
Ok, I've tried this out, and it all comes grinding to a halt on the PDF to image conversion, which with Open-source libraries takes about 10s for each page, making this a Non-option. A hat tip to Adobe for making it so fast with their app.
Related
My app has a Report screen that includes a bunch of small bitmap images. I want to be able to take those images, and put them all into a single image file (formatted properly so that they are not overlapping) for viewing, but I'm unsure of how to go about it. I'm trying to prevent having a separate file for each image if possible. Does anyone know how this could be achieved? I'm not looking for someone to do it for me, but just give me a nudge in the right direction.
I am working on an Android app where, once a user clicks a login button, the app launches an AsyncTask to verify account details with a remote server. That part works fine by itself and doesn't make my app slow. However, when you click the login button, it launches a second activity where I have 4 ImageViews. When I added that part of the app, it became significantly slower (from less than a second to about 5 seconds loading time). I load the images into the ImageView from the XML layout file directly, so I'm not sure what I'm doing wrong.
My question is that do ImageViews make your app slow, and if so, how do you optimize their performance?
I was working my own app when I actually experienced this too. The reason is because if the files are to big they take a while to load into memory and set as the Image View. There is two ways you could really sort it out.
1: Get a smaller version of the picture. Smaller pictures come up faster and aren't prone to an OutOfMemory exception which kills the app :(.
2: A better way is to use the Picasso api. I used this APIs to add images in list views, expandable list view with pictures in them. The app was fast and fluid :)
Picasso's api would be your best bet ant it is easy to implement.
Edit:
Here is the link to the site to get the APIs :)
Picasso
The only way I could figure this out is to create an image in photoshop that has all the buttons laid out where you want them on top of the image. Interpret it into your app and put regular buttons over top of the imagebutton pictures that you placed onto your background image. Set the size accordingly to your images of your buttons and then set the background of each button to #null so they aren't seen. Now trying to figure out how to interpret this into orientation view even though I don't think I'll be using orientationview. OH AND CHANGED THE EXTENSION TO A GIF TO SAVE ON DATA RATHER THEN PNG.
Hope this helps I'm sort of new at coding on android as I have lots of experience with HTML .
Cheers
THANKS FOR THE DOWN LIKE I WAS SORT OF NEW AT THE TIME OF NOT KNOW OTHER WAYS TO SET THIS... THANKS THOUGH, MORONS
In what language(s) is it (if at all possible) to check the content of an image?
Ideally, I am looking for web / mobile languages, but whatever is possible.
As a comparative example, I wish to make the first image of a castle 'valid' and the second image of the wall 'invalid', due to there been no substantial content in the second image. Meaning, the second image, which is the wall, has too much similarity across the image and therefore doesn't contain valid content.
Please do not provide a 'how to do it', as I am a student and will be working out solutions for myself as much as possible, I just need to know that what I want to achieve is possible in the first place and a starting point for language(s).
**EDIT2: What Javier has suggested about computer vision is on the right track to what I mean. Image analysis to break it down a little more. I wish to visually analyse an image and determine how the range of varied the colours across an image are to determine if there is actually a proper image present on not just a picture of a wall
I'm a newcomer in development of android apps. But, I'm undertaking what feels like a large project and I'm looking for information on whether it will work or not, before I get to far in.
As I've read, when trying to display very large images in android, it is most useful to use the "webview".
So, I took that advice, split my image into 1024 smaller images, and laid them out in an html table (not quite finished yet). Now, I'm noticing as the table gets larger my phone begins to lag upon scrolling.
My question is, is webview trying to render every single picture at once upon loading? If so, is there a way to make webview only render a set of images at one time? Let's say I'm at 14,000X x 24,000Y on the image, can I set webview to render the next 5,000px in each direction only, or is this necessary at all?
I can't seem to find the information I'm looking for, but will continue to search. Otherwise, any and all help is appreciated. Thanks!
i have exactly same problem and i found use full this library:
https://github.com/nostra13/Android-Universal-Image-Loader
you can configure a lot of parameters and using cache..
I'm working on a project that requires a custom tile map of a building to be displayed along with up to several hundred "points" to be plotted as objects within the building, all on one or more mobile platforms (Android to start).
There were two ways I thought of to tackle this issue. One was to use osmdroid or mapsforge to display a zoom-able tile map. One issue I've had with this, however, is that I haven't been able to locate the software to automatically split up the single image into the correct tile format. MapTiler has worked fairly well, except my Y axis tiles are all upside down.
The second was to display the entire image as an imageview, and then write the code to display the points of interest on the map as the image view is scrolled around. However, I'm not quite sure how I would go about drawing an undefined amount of images on top of an image already displayed in an image view.
Does anyone have any ideas or might they be able to point me in the correct direction?
You can use http://code.google.com/p/gheat/ and put the tiles from your server in your android app.