09-24-2012 11:55 AM - edited 09-24-2012 11:56 AM
I am facing this strange behaviour. This line of code that works perfectly for my colleagues is throwing error for me. I am creating an EncodedImage from GIF file and GifEncodedImage from the EncodedImage. It is throwing ClasscastExcpetion when I try to create GifEncodedImage from EncodedImage. This code works correctly for others.
EncodedImage encImage = GifEncodedImage.getEncodedImageResource("img/a.gif
GifEncodedImage gifImg = (GifEncodedImage) encImage; //ClassCastException
Jdk version 1.6.35
BB OS 5.0
Help of any sort is appreciated.
09-24-2012 12:43 PM
Please try this code:
I think GifEncodeImage is a different class. So try GIFEncodedImage class.
EncodedImage encImage = GIFEncodedImage.getEncodedImageResource("img/a.gif
GIFEncodedImage gifImg = (GIFEncodedImage) encImage;
Please press like, if you got your answer.