cmc100
November 9th, 2004, 07:30
Hi all,
I have written an application using image.createImage( imageByteBuffer ) to try creating an image for display after i have stored a JPEG file byte values in the byte array imageByteBuffer. but when I try to run the application, the error IllegalArgumentException : bad file format occur.
I just want to ask, how can I resolve this problem?? I have read the documentation about the method createImage( ), it say this method is for PNG file, so if i convert my JPEG buffer imageByteBuffer to PNG format, will this work? If yes, how can I convert them to PNG??
also is there any other ways to display a buffer holding JPEG byte values like the one i got here?
The software I am using is WTK21.
Thanks you very much for your help!
I have written an application using image.createImage( imageByteBuffer ) to try creating an image for display after i have stored a JPEG file byte values in the byte array imageByteBuffer. but when I try to run the application, the error IllegalArgumentException : bad file format occur.
I just want to ask, how can I resolve this problem?? I have read the documentation about the method createImage( ), it say this method is for PNG file, so if i convert my JPEG buffer imageByteBuffer to PNG format, will this work? If yes, how can I convert them to PNG??
also is there any other ways to display a buffer holding JPEG byte values like the one i got here?
The software I am using is WTK21.
Thanks you very much for your help!