Im stuck, and out of ideas....
Is there any way to specify NO COMPRESSION on a jpeg image?
I have a renderedImage object that contains no more than 2 colors call
them color A and color B. I would like to be able to access all the
pixels of color B and change them. However with the compression, some
of the colors in the jpeg do change to other colors (perhaps colors
C-Z).
I need to work with a Jpeg because I am using JMF to create a movie
file.
I thought that perhaps it was due to the quality of my jpeg... So I
tried this to increase the quality to the highest setting-
http://javaalmanac.com/egs/javax.imageio/JpegWrite.html
Still I have discolorations around color A, obviously from the jpeg
trying to blend the 2 colors. I want to stop the blending and stop the
compression! Just want a plain old school 2 color image.
sorry for the rant, please let me know if you have any ideas...
> Im stuck, and out of ideas....
>
[quoted text clipped - 18 lines]
>
> sorry for the rant, please let me know if you have any ideas...
JPEG is the wrong tool for the job. See
http://www.faqs.org/faqs/jpeg-faq/part1/section-13.html
If you want to stick with a lossy file format, you'll have to build
tolerances into your colour matching algorith, That is, if you *KNOW* an
image is only composed of two colours, then when you see a colour that isn't
one of the two, you have do some "rounding" to find out which of the two
known colours this new colour is "nearest" to.
- Oliver
tiewknvc9 - 12 Apr 2006 22:54 GMT
hmmm that sux :(
Well... Is it possible to make a .mov file with PNG files in JAI? or
would another file format work within the JMF? Or is PNG files also
lossy and crapridden? Im looking for a way to convert a set of image
files into a .mov file...
Thanks for your response!
Roedy Green - 13 Apr 2006 05:50 GMT
> Or is PNG files also
>lossy and crapridden?
PNG are similar to GIF, usually a little more compact. They use a
lossless compression.
JPG is designed for photos. PNG/GIF is for logos and transparent
backgrounds. PNG also has variable transparency.
see http://mindprod.com/jgloss/png.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.