i am using LibJpeg library for decoding jpeg image ( given in form of byte array ) into rgb color map . but it come different from my sample output i want to check by java programme . how to do this in by java programme ? what is use of APPn in header ? how to decode jpeg image into rgb pixel .
-
1Can you post some code of what you have tried till now and what is not working as per your expectations? thanks.aldrin– aldrin2011-09-14 10:47:05 +00:00Commented Sep 14, 2011 at 10:47
-
1i have libjpeg library and getting image in bmp format from raw data of jpeg but sample output is taken from blackberry that is in rgb pixel . when i read pixel of my libjpeg output(output.bmp) value by rgb() in java it give me different pixel value from that of sample output taken from blackberry . is there any reason for this?user894554– user8945542011-09-16 11:48:52 +00:00Commented Sep 16, 2011 at 11:48
-
1Please provide som code.dacwe– dacwe2011-09-17 19:25:54 +00:00Commented Sep 17, 2011 at 19:25
Add a comment
|
1 Answer
Why not use ImageIO.read together with ByteArrayInputStream to read the byte array into an image then no extra library is needed (pure java solution):
BufferedImage image = ImageIO.read(new ByteArrayInputStream(bytes));