I use a png image in my project that is not displayed in emulator but it can be displayed in phone. Then i open it with photoshop, save as png and use that image. It is displayed both emulator and phone. I couldn't figure out the difference of original and edited one. And is there any setting of emulator for image display? And how can i understand any png file is supported or not?
original image
edited image
I preferred PNG files is good for MIDP. You can check following links, It will helps you.
What image types does MIDP support?
Image Formats in J2ME
Related
I am trying to include GIFs in my android application. My GIFs are shared as a document on Google Drive with public access enabled. Currently, I'm trying to use Glide to include the GIFs.
Glide.with(parent.getContext())
.asGif()
.load("https://drive.google.com/uc?id=1-QKgZ76K3EZQlbXyY3wI57FA8k31JmrA")
.into(imageView);
However, although there is no error, the GIF does not display on my phone, even after a long time(internet issues shouldn't be the problem).
It appears that this is only a problem for GIFs on google drive. Trying to show an internet GIF such as this one works on my Android phone.
How can I show GIF files on Google Drive with Glide on my Android device?
It should work. Because Glide trying to fetch image which type you specified. I just tried it and its work. it loads too late. If you wait a bit, you will see that it can be loaded. You can test it more easily if you upload a lower resolution gif file to Drive.
Working on an app using Camera-X and I want to capture images in grayscale mode before saving the image,
I checked out this but no solution, what is the best way to go about this.
I want to display the below JPEG image in an ImageView.
Android Device is not able to decode the Image. Log Cat is showing this message: decoder->decode returned false. The image is loading correctly on PC and in chrome(Mobile). I've tried various solutions already on the StackOverflow, None of them worked. Currently, I'm displaying the image in a WebView and It's working fine.
webView.loadUrl("file:///"+Environment.getExternalStorageDirectory().getAbsolutePath() + File.separator+"0101YC17000000000003.jpeg")
It's not an optimal solution, so I want to display the image in ImageView from the external storage.
Original Image: 0101YC17000000000003.jpeg
I want to show this image in an Android (Java) app, but the app displays it as. How do I display the first image in an app without getting this blurring effect?
EDIT::
And how can I change the size with no blurring effect?, the imagen will show pixelated. Like this http://i.gyazo.com/18b227adb4c442b09152ca6ebc04c54c.png
To show image with the original size use layout_width="wrap_content" and layout_height="wrap_content". This is considering that your image is smaller than the screen in which it is to be shown. Also if you only provide image in your drawable-hdpi folder then the images in mdpi screen with be scaled by a predefined scale factor(possibly 2). Same case applies for other screen density. To avoid this scaling you can put your images in drawable-nodpi folder.
Note: the images you posted are not properly made(highly pixilated). Try optimizing the resolution and provide multiple resources.
How to read text from image in android app.
Edited:
I want to detect text from image which i have captured from camera in android.
Is it possible or is there any library to read text from taken image.
This is not related to android. If you like to get text contained in image you will need
detect text position in image
perform OCR on found text
This task is not trivial and requires some computing resources. There are some OCR libraries around - like opencv, tesseract etc. I and others also develop pure java opensource solution:
http://sourceforge.net/projects/javaocr/