Welcome!

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

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

Image or not image ????

Hello

 

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.

Please use plain text.
Developer
simon_hain
Posts: 15,870
Registered: ‎07-29-2008
My Device: Z10 LE
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
Please use plain text.
Developer
LMcRae
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.

 

Bitmap.createBitMapFromBytes

 

 

Please use plain text.