Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

jpeg image quality

Thread view: 
tiewknvc9 - 12 Apr 2006 22:14 GMT
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...
Oliver Wong - 12 Apr 2006 22:28 GMT
> 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.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.