Community
cancel
Showing results for 
Search instead for 
Did you mean: 
p3pp8
Beginner
116 Views

Decoded JPEG is a Green image

Hello, i've used the code sample for reading and decoding jpegs, all works fine, no errors, but when i save the image as a bmp is all gren, i tried to save the raw image data too and the result is a pattern of the same values r=0 g=0x87 b=0.
Any idea?
thanx in advance

0 Kudos
9 Replies
Vladimir_Dudnik
Employee
116 Views

Hello,

what exactly sample do you use, what is operating system and hardware platform? What is version of IPP you are build with? Could you please provide your input JPEG file?

Regards,
Vladimir

p3pp8
Beginner
116 Views

Hello, here you are all the informatations:

SAMPLE: ipp-samplesimage-codecsjpegview

OS: WindowsXP SP2

CPU: AthlonXP 1800+ (i hope this isn't a problem tough, i'm about to buy a p4 but i want my code to run within an athlon cpu too)

IPP VER: 5.3 update 1 build 85.18

LINKED LIBS: ippcore.lib ipps.lib ippi.lib ippcc.lib ippj.lib

of course i use the 32bits version of ipp.

In attachment both the bmp and the original JPEG image

Note: i haven't compiled the sample but just included the source for jpeg into my project that has been built using visual studio 2005, again the code compiles and executes without problem but the resulting image is bad, if you want i can attach the raw image data too but believe me it's just a fill of 0,0x87,0 bytes.
Thank you very much for the help


Vladimir_Dudnik
Employee
116 Views

Proabably they key here is that you are talking about your own project. The IPP 5.3 JPEGView sample built with script can open this file and save it to BMP without any problems.

Vladimir

p3pp8
Beginner
116 Views

Ok man, but i need to open a jpeg for my project, pleez tell me how to do it if i can't use the jpeg source sample, is there another way to do it, or, if i post the part of my source code where i open and decode the jpeg may you help understanding what's wrong?
Thanx in advance.

PS: The problem here is that at the base of all the project there is to open a jpeg or all the other functions are useless the IPP ones too of course, please don't tell me that i've to use another library different from IPP to open a jpeg, it's really not valuable.

Vladimir_Dudnik
Employee
116 Views

Well, in general, I would say that you can open JPEG just like it implemented in JPEGView sample. It work and you have all source code for that, is not it?

If you can provide us with piece of code where you call JPEG decoder we may check if something is wrong here

Regards,
Vladimir

p3pp8
Beginner
116 Views

Yep, in fact i use the code from the jpegview samples, ok so, as soon as possible i'll post the piece of code that is really simple, it's been taken from GetImageFromJPEG(lpszPathName); in the JPGViewDoc.cpp source and used as it is(of course i've imported to my project all the source from da jpeg folder too) within my project, so it's really strange it doesn't work, anyway i want to thank you very much for you support.

Vladimir_Dudnik
Employee
116 Views

Thanks, we will be glad to help with the issue.

Vladimir

p3pp8
Beginner
116 Views

Ok man, i've solved the enigma, i was just not initializing the m_param_jpeg structure, so the decoded image was wrong, again i want to thank you for your support.
Cheers

Vladimir_Dudnik
Employee
116 Views

Yes, that is correct finding

Vladimir

Reply