Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Contributor
Posts: 9
Registered: ‎04-07-2010
My Device: Strom
My Carrier: AT & T

Image or not image ????



I want to know that if the file located at a particular postion of SDCard is an image or not and want to retrieve the type of that image. How can i do that ? Kindly hlep


Thanks in advance.

Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Image or not image ????

the filetype is usually stored in the first few bytes. ask google about how to identify your picture type

feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Posts: 163
Registered: ‎04-16-2009
My Device: Not Specified

Re: Image or not image ????

It might be a little heavy handed but you could try and create a Bitmap from the data and see if it succeeds.