This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Friday, May 26, 2006 9:57:55 AM(UTC)
Groups: Registered
Posts: 3
We have a process that takes 2 .jpg files and combines them. Image.jpg1 is combined with footer.jpg and then saved as image1.jpg (the result is the original image overlaid with a "footer" image). This process actually runs daily without checking to see if the image1.jpg has already been combined so image1.jpg is actually recombined over and over. What we've seen is a decrease in color quality over time. Can I assume this is due to the Jpeg compression method?
We're using LEADTOOLS 12 for Visual Basic 6.
#2
Posted
:
Thursday, June 1, 2006 7:46:21 AM(UTC)
Groups: Manager, Tech Support
Posts: 367
Was thanked: 1 time(s) in 1 post(s)
You are probably right.
Common JPEG compression is from a family of compression algorithms that we call 'Lossy'. Other examples are JPEG2000 and LEAD CMP.
This means if you merely load any image and save it with lossy JPEG compression, the resulting image file will not be 100% identical to the original, even if you use a compression quality factor value of 2 (which gives highest quality). Of course, if you use higher quality factors (up to the maximum 255), the differences will increase.
There could be different solutions to the problem, depending on your work process. For example, you could switch to a lossless compression format, such as TIFF LZW or PNG.
If you must use JPEG, you could modify your code to detect if an image is already overlaid, and skip saving it if that's possible.
Note: There's a lossless variation of the JPEG compression algorithm and LEADTOOLS does support it. However, it's not very common among other applications and might give you compatibility problems if your images are used with non-LEAD programs.
Amin Dodin
Senior Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.