Improve quality of JPEG images

Hi
I have an application which saves images in JPEG format after editing (well, many applications does that, but this is only a fraction of what this application does) :-)
I can't use any other formats due to size restrictions. The problem is Image Editing module of this application has operations like line drawing and text inserting. When I save the image, fine lines (especially texts) are getting blurred.
Is there any way I can increase the quality of JPEG files saved? I understand that JPEG is not meant for sharp lines and texts but with Photoshop, even fine lines and texts appear good when saved as a high quality JPEG file. Is there any such method in Java by which I can increase the quality of JPEG images?
Thanks in advance...

Is there any way I can increase the quality of JPEG files saved? I understand that JPEG is not meant for sharp lines and texts but with Photoshop, even fine lines and texts appear good when saved as a high quality JPEG file. Is there any such method in Java by which I can increase the quality of JPEG images?I JPEG is a non-conservative compression format (you do not get back exactly what you put in, it has "acceptable degredaton"--I talked with the author before it became popular and he explained what JPEG was all about--high compresses resulting in a small size for internet communications over dialup.
In more recent times I've seen quality factors brought into play with JPEG, but as you have stated, even in Adobe Photoshop under the highest quality, you still have degradation. I've seen some hint and some state that you can get a lossless JPEG, but I've not encountered it yet.
In any case, if you do find a "lossless JPEG" the size of that file is going to be bigger than you are looking at now. You may consider other file formats--TIFF or there are even more recent files formats that have higher conservative compression algorithms.

Similar Messages

  • How do I control the quality of JPEG images?

    I've written a program that scales a set of JPEG images down to various dimensions. I'm happy with the speed of execution, but quality of the images could be better. How do I specify the quality of the JPEG images I create? In graphics editors, I'm given the option of controlling the lossy-ness (?) of JPEGs when I save them, either reducing image qualify to shrink the file size or vice versa. How can I do this programmatically?
    Thanks

    Hi Jhm,
    leaving aside the scaling algorithm, to save an arbitrary image with 100% quality you'd use
    something like the following code snipet below
    regards,
    Owen
    // Imports
    import java.awt.image.*;
    import com.sun.image.codec.jpeg.*;
    public boolean saveJPEG ( Image yourImage, String filename )
        boolean saved = false;
        BufferedImage bi = new BufferedImage ( yourImage.getWidth(null),
                                               yourImage.getHeight(null),
                                               BufferedImage.TYPE_INT_RGB );
        Graphics2D g2 = bi.createGraphics();
        g2.drawImage ( yourImage, null, null );
        FileOutputStream out = null;
        try
            out = new FileOutputStream ( filename );
            JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder ( out );
            JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam ( bi );
            param.setQuality ( 1.0f, false );   // 100% high quality setting, no compression
            encoder.setJPEGEncodeParam ( param );
            encoder.encode ( bi );
            out.close();
            saved = true;
        catch ( Exception ex )
            System.out.println ("Error saving JPEG : " + ex.getMessage() );
        return ( saved );
    }

  • Loosing quality of jpeg image

    Hello,
    I am inserting an image (jpeg) into reports 6i, using file->import->image : quality=good (tried excellent too), although original's quality is fine, it becomes awful when the report is generated. Any ideas?
    Thanks
    JP

    Hello,
    I am inserting an image (jpeg) into reports 6i, using file->import->image : quality=good (tried excellent too), although original's quality is fine, it becomes awful when the report is generated. Any ideas?
    Thanks
    JP

  • How can I improve quality of image when burning a movie to a DVD

    How can I improve quality of image when burning a movie to a DVD?

    What resolution are you using?  If the DVD is to be playable on an ordinary DVD player, only ordinary TV resolution is supported.  You need Blue ray for HD.
    Geoff.

  • Crappy photo quality when inserting images, how to improve?

    I work extremely hard on the quality of my images and when I use iDVD they don't look to bad, but when I insert images in between video clips in iMovie the quality of the images is degraded something terrible and my professional images look like they were taken on a cheap camera phone. Exporting the videos at the highest quality helps a little, but it seems to be the import quality which is reducing them down - least that is what it appears to me.
    How can I improve the photo quality in iMovie?

    Hi,
    Defcom has listed the main fix.
    You could also try the Bandwidth setting in iChat > Preferences > Video section > Bandwidth Limit drop down.
    We would suggest 500kbps for some ISPs
    Using Little Snitch does show that Bonjour Video chats do use the Internet
    It is probably done so that the SNATMAP Server that helps connect Video and Audio Only chats knows you are busy.
    9:34 PM Tuesday; July 28, 2009
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • How to get a jpeg image to a movie with best possible quality

    I've got a jpeg image from my 2 megapixel digital camera and I'm playing around with converting it to a movie. Yes, its a one image movie.
    +QuickTime Pro+ does a superb job when I choose H.264, 1024 kb/s, but I can't get iMovie 5.0.2 to give me the same quality. This is what I have done:
    1. Create a new movie as type MPEG-4.
    2. Imported the jpeg image and adjust the time from 5 seconds to about 2 seconds.
    3. Select Share, choose H.264, 1024 kb/s from the relevant option and after the movie making happens, the quality is obviously inferior to that from +QT Pro+.
    *QUES 1*: Why is the quality inferior?
    I have been to iMovie help and noticed this comment:
    "When you import clips in a format different from your project, they are converted to the video format of your movie."
    *QUES 2*: Is this why my jpeg image is losing quality? Is iMovie converting it to something else?
    Further, when the jpeg image is first imported, it is assigned a clip time of 5 seconds. When I move one of the sliders to reduce the time to just a few seconds, I notice that a black band appears at the top of the image in the iMovie window and as I make the time smaller, the image zooms in and the black band becomes wider. Letterboxing at the top seems to be occuring. This I can't fathom.
    *QUES 3*: Why does iMovie zoom in when I adjust time?
    Any comments most appreciated, especially those that tell me if iMovie can make a movie from jpeg images with the same quality as QT Pro -- and how to do that.

    Re the quality -- I think I have answered this one myself. Correct me if I'm wrong, but it seems to me that when I select a video option (DV, HD 1080 and so on), iMovie sets up a frame size to suit, and the frame size that iMovie sets up for MPEG-4 happens to be 640 x 480, thus the poor quality of my jpegs when I selected that option. The poor quality had nothing to do with the MPEG-4 format.
    Now the interesting things is, MPEG-4 is not limited to 640 x 480. It can be any size. So my question is:
    Ques: Can I set up a movie within iMovie that is any size I want? QT Pro gave better results because it allows any size movie at all, and thus adjusted the movie size to my jpeg size (1800 x 1200 pixels) when I imported an image from my digital camera.
    As it stands, not even the highest quality option in +iMovie 5.0.2+ (HD 1080) can handle the images from my piddly-little 2 megapixel camera.
    Message was edited by: Guy Burns

  • Shift + R improves the quality of this image

    Does anybody know how to get rid of ' shift + r improves the quality of this image', this is affecting most of the images i look at. It never used to be an issue??
    Thanks

    Hi
    that is exactly what you see with some usb modem connections - the 'Modify Headers' add-on should sort Firefox out (at the expense of slower loading & more data usage).
    a safari solution is mentioned here, but it's a bit old, with no documentation I can see. I'd hope there to be an extension by now which will deal with it - try https://extensions.apple.com/en-us/ or even the isp's pages may have a way to disable it.

  • Save metadata in LR - degrade JPEG image quality?

    Hi:
    Does anyone know whether using the 'save metadata' feature in LR to save changed metadata to a JPEG file will result in a resaving of the entire file and/or otherwise degrade the JPEG image quality? 
    If it does not degrade the image quality, how does this feature work?
    Many thanks for the help

    Each pixel remains unchanged in this process.
    I was under the impression that any re-saving of a jpeg image results in a slight loss of quality, regardless of whether there have been changes to the image
    This is true for other editors, such as Photoshop or Photoshop Elements, but it is not true for Lightroom because, as explained, LR does things differently than other software.

  • Quality of JPEG when being converted by Folder Actions (Image Events)

    I take a lot screenshots with Command + Shift + 3/4. They are in PNG and I love them. Yet, I need to send them via email sometimes.
    I convert them to JPEG using Preview, but it is time-consuming when especially I have hundreds of them.
    I have just learnt that it is possible to do convert in batch using Folder Actions. However, I meet few very serious problems.
    1. In Preview, I could choose the quality of JPEG before converting. But, there is no such option in Folder Actions. I even searched online to try to modify the script and it seems that nobody cares about the quality of converted JPEG.
    My question: What is the quality of JPEG converted? And, is it possible to modify it?
    2. Since I do not know the quality of conversion using Folder Actions, I tried different qualities using Preview and match the outputs with those using Folder Actions. I got no result. As Preview is using Core Image as the processing architecture.
    My question: What is the image processing architecture adopted by Image Events?
    3. If the quality is unchangeable, can anyone teach me how to write a new script to do the conversion using Preview?
    I really hope Mac OS gurus could explain these to me and possibly solve my problems. I am interested to learn the AppleScript part to modify it.
    Thank you very much.

    It is the original folder action script from Mac OS. Here is the copy.
    Could you help me as well where to add the "compression level"? Also, what do "high", "low" and "medium" mean, in % just like Preview, if they use the same image processing architecture?
    Again, thank you very much for quick reply.
    ================
    Image - Duplicate as JPEG
    This Folder Action handler is triggered whenever items are added to the attached folder.
    The script creates a JPEG version of the file, but leaves a copy of the file
    in its original format. If the original file is already in JPEG format, the script does
    not duplicate the file.
    Copyright © 2002–2007 Apple Inc.
    You may incorporate this Apple sample code into your program(s) without
    restriction.  This Apple sample code has been provided "AS IS" and the
    responsibility for its operation is yours.  You are not permitted to
    redistribute this Apple sample code as "Apple sample code" after having
    made changes.  If you're going to redistribute the code, we require
    that you make it clear that the code was descended from Apple sample
    code, but that you've made changes.
    property done_foldername : "JPEG Images"
    property originals_foldername : "Original Images"
    property newimage_extension : "jpg"
    -- the list of file types which will be processed
    -- eg: {"PICT", "JPEG", "TIFF", "GIFf"}
    property type_list : {"TIFF", "GIFf", "PNGf", "PICT"}
    -- since file types are optional in Mac OS X,
    -- check the name extension if there is no file type
    -- NOTE: do not use periods (.) with the items in the name extensions list
    -- eg: {"txt", "text", "jpg", "jpeg"}, NOT: {".txt", ".text", ".jpg", ".jpeg"}
    property extension_list : {"tif", "tiff", "gif", "png", "pict", "pct"}
    on adding folder items to this_folder after receiving these_items
              tell application "Finder"
                        if not (exists folder done_foldername of this_folder) then
      make new folder at this_folder with properties {name:done_foldername}
                        end if
                        set the results_folder to (folder done_foldername of this_folder) as alias
                        if not (exists folder originals_foldername of this_folder) then
      make new folder at this_folder with properties {name:originals_foldername}
                                  set current view of container window of this_folder to list view
                        end if
                        set the originals_folder to folder originals_foldername of this_folder
              end tell
              try
                        repeat with i from 1 to number of items in these_items
                                  set this_item to item i of these_items
                                  set the item_info to the info for this_item
                                  if (alias of the item_info is false and the file type of the item_info is in the type_list) or (the name extension of the item_info is in the extension_list) then
                                            tell application "Finder"
                                                      my resolve_conflicts(this_item, originals_folder, "")
                                                      set the new_name to my resolve_conflicts(this_item, results_folder, newimage_extension)
                                                      set the source_file to (move this_item to the originals_folder with replacing) as alias
                                            end tell
      process_item(source_file, new_name, results_folder)
                                  end if
                        end repeat
              on error error_message number error_number
                        if the error_number is not -128 then
                                  tell application "Finder"
      activate
      display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
                                  end tell
                        end if
              end try
    end adding folder items to
    on resolve_conflicts(this_item, target_folder, new_extension)
              tell application "Finder"
                        set the file_name to the name of this_item
                        set file_extension to the name extension of this_item
                        if the file_extension is "" then
                                  set the trimmed_name to the file_name
                        else
                                  set the trimmed_name to text 1 thru -((length of file_extension) + 2) of the file_name
                        end if
                        if the new_extension is "" then
                                  set target_name to file_name
                                  set target_extension to file_extension
                        else
                                  set target_extension to new_extension
                                  set target_name to (the trimmed_name & "." & target_extension) as string
                        end if
                        if (exists document file target_name of target_folder) then
                                  set the name_increment to 1
                                  repeat
                                            set the new_name to (the trimmed_name & "." & (name_increment as string) & "." & target_extension) as string
                                            if not (exists document file new_name of the target_folder) then
      -- rename to conflicting file
                                                      set the name of document file target_name of the target_folder to the new_name
                                                      exit repeat
                                            else
                                                      set the name_increment to the name_increment + 1
                                            end if
                                  end repeat
                        end if
              end tell
              return the target_name
    end resolve_conflicts
    -- this sub-routine processes files
    on process_item(source_file, new_name, results_folder)
      -- NOTE that the variable this_item is a file reference in alias format
      -- FILE PROCESSING STATEMENTS GOES HERE
              try
      -- the target path is the destination folder and the new file name
                        set the target_path to ((results_folder as string) & new_name) as string
                        with timeout of 900 seconds
                                  tell application "Image Events"
      launch -- always use with Folder Actions
                                            set this_image to open file (source_file as string)
      save this_image as JPEG in file target_path with icon
      close this_image
                                  end tell
                        end timeout
              on error error_message
                        tell application "Finder"
      activate
      display dialog error_message buttons {"Cancel"} default button 1 giving up after 120
                        end tell
              end try
    end process_item

  • PSE11 "Instant Fix" JPEG image quality

    How can I set the Instant Fix mode to save as maximum JPEG image quality ?
    thanks
    Ian

    Hi Ian
      Open the image in Expert mode then select one of the auto-fixes from the Enhance menu.

  • Firefox 3.6.8 causing all JPEG images to be compressed like AOL 9.0

    System Setup:
    Windows 7 Home Premium x64
    NVIDIA GeForce 9500 GT (newest drivers installed)
    Aero is running, switched it off to troubleshoot. Problem persisted.
    Steps to Create the Problem:
    1.) Updated to 3.6.8 from 3.5.11.
    2.) Loaded up my website: http://www.columbuswebseo.com
    3.) I noticed that the background image looks compressed (where it has a gradient around the blurred light specks in top right corner) . Like a highly compressed JPEG image from AOL days (to speed up page load times).
    4.) Messed with all FireFox, Windows 7, NVIDIA, physical Dell LCD monitor color settings. Even did research on my RoadRunner connection to see if they implemented an accelerator of some sort. Disabled Add-ons one by one re-testing the issue along the way. Problem persisted.

    It's not your graphics card. It's not your OS. It's not your browser.
    It's your internet. I had a broadband card, and I figured out that my ISP (Internet Service Provider) was actually downgrading my image quality to make my internet faster. It's called Network Optimization. Look in the options menu of your broadband connection application (Like if you have T-Mobile or whatever, look in the part the application that connects you to the internet) and see if you can change your Optimization Settings. This should clear things up for you.
    Also, if your internet is really that slow, like mine was, I would suggest getting another provider. It's the best option. Hope that helps. :)

  • Problem with jpeg images imported from Illustrator

    Hi, i am kind of new with Premire and video, though have experience in web design and coding, but i have noticed a weird problem with premiere pro cs 5.5  when i  import jpeg pictures and put them as intro before the video that where done in adobe illustrator and have vectors and stuff, the quality of the image gets pretty bad and blurry...i searched through the internet looking for clues on what to do like changing to png, tiff formats but nothing has helped so far....any ideas on what to do. So when i import jpeg,png images from illustrator (that have vectors or illustrations) do i have to do something special with it, or import it in some special format??? i would appreciate the help.
    This is how the image looks on youtube:
    Anyway here is the video with its poor image quality. http://www.youtube.com/watch?v=o_oMNzXAZ8Y&feature=youtu.be
    This is how it looks originally before putiing it, in premiere pro cs 5.5
    Anyway here is the video with its poor image quality. http://www.youtube.com/watch?v=o_oMNzXAZ8Y&feature=youtu.be
    THANX guys would appreciate the help!!!

    hiya.
    video likes 72 dpi ( though some will say it doesnt matter .. thats a long story ). basically video 'shows' 72 dpi ( basically what the monitor resolution is...typically 72 dpi ).  As you know from print and dimensions, there is a relative sorta thing with byte count ( file size in bytes ), ppi ( I usually say dpi but in video its ppi ....same thing basically )..., and dimensions ( width x height ).
    soooo , as you know in print and web stuff...there is a relationship between number of dots or pixels, dimensions in inches or pixels, and overall byte count of file size....
    That said, in "print" it is usually best to go with 300dpi.. In video it is best to go with 72 ppi.....
    Also, in print and going offest press.. its nice to go with cmyk ( for color separations ).. but in video and web its best to go with RGB.
    The video stuff doesnt deal with vector stuff... it just sees and deals with bitmapped stuff...vector stuff is a mathematical sorta thing whereas video stuff is just plain old bitmaps ( like BMP, TIF, JPG, etc )...
    Ideally your still images and graphics in a video editing program would be bitmapped rgb 72 ppi.. and match exactly the dimension of your video format ( eg. 1080p ).  That said, it is normal to have LARGER images ( still images and graphics ) than your project dimensions if you PLAN ON SCALING AND MOTION )... like, your original graphic or pic can be larger than the project if you plan on scaling it down over time to make it look like you are zooming out in the video ....
    To get the best results of a graphic or picture in a video is to have it exactly the project size ( eg. 1920x1080 px at 72 ppi for full HD ).
    soooooo.... if you convert your vector to bitmap, save as psd or tif or something... at 72ppi , with the dimensions in inches or pixels that equals the video ( 1920x1080 for example )... you will see what you want in your second sample ( the original )...
    ps.. you can import layers to the video if you wanna do a psd file and have ONE of those layers the one you use in your video ...can label it something like " video layer " ... whatever...

  • How to get crisp jpeg images for slideshow on a Mac with Final Cut?

    Hi, I imported a large number of jpegs into Final Cut Pro and when I export to Quicktime Movie (not modifying the sequence size or settings I notice the quality of the jpeg images looks rather washed out and a bit fuzzy. The image dimensions of the jpegs are actually 2848 x 4272 and I was originally using a sequence setting of 720 by 480 (which scaled the images to about 12%). I experimented with doubling the sequence setting to 1440 by 960 and scaled the images to about 25.5% - still a bit washed out look.
    Basically this will be a presentation on a computer and output via projection. Looking for best possible and clearest photos. I experimented with iPhoto and when you play a slideshow it looks very crisp - this is what I am aiming for. When I export using the Slideshow export at the largest size 640 by 480 in iPhoto to quicktime - the quality seriously deteriorates.
    What would be the best way to maintain the crispness of the photos in Final Cut for an export to Quicktime that would be show on a Mac via a projector? Thank you

    Hi Nick, I do see information on creating a slideshow with Quicktime at: http://www.apple.com/quicktime/tutorials/slideshow.html
    however it appears Quicktime X removed that capability. There is no 'open image sequence' option from the File menu in Quicktime X.
    If I do end up sticking with Final Cut - would you recommend any codec and/or dimension size that would result in the best quality or the most crisp image? I also need a few fade in's and out's on various parts - I don't believe I would have the control without Final Cut.
    Would resizing the image files in Photoshop to 1920 pixels by 1280 before importing them into Final Cut result in crisper images? Thanks.

  • Making the resolution of jpeg image higher

    Hello, I am wondering how I go about editing a jpeg image i saved from an online unknown source so that the resolution is high enough so that when I go to print it on a canvas at walgreens it is not distorted or blurry. Keeps telling me low quality, and resolution is to low to print at quality level. Please help. step by step as i am new to photoshop

    Adobe's new Large Document Format (PSB) adds support for Photoshop documents larger than 2GB. The documents you save this way can't be opened in earlier versions of Photoshop -- they can only be opened in Photoshop CS or Photoshop CS2.
    Before you can use the Large Document Format option, you'll have to open Photoshop's file handling preferences and turn the feature on.
    Mac: Photoshop > Preferences > File Handling
    Windows: Edit > Preferences > File Handling
    Once the option is activated in preferences, the Large Document Format becomes an option in your standard Photoshop save dialog box.
    Large Document Format also adds support for savings images greater than 30,000 pixels in width or height -- something the original Photoshop format did not permit. The new PSB format now supports images up to 300,000 pixels in width or height.

  • How do I get non-pixelated quality for imported image?

    I want to import a high quality image from Photoshop into Final Cut Express 4.0 and be able to watch the clip
    on fullscreen without loosing too much quality. The quality decreases to a very pixelated version of my image
    and does not look good at all. Any suggestions?

    Exactly what is the image -  TIFF?  JPEG?  PNG?  Something else?
    What is the image size (pixel dimensions)?
    What are your sequence settings in FCE?
    FCE prefers JPEG images, and ones that do not require a huge amount of scaling to fit into the video frame.  Keep in mind that a video frame is 720x480 (DV-NTSC), 720x576 (DV-PAL), 1280x720 (HD), 1920x1080 (HD), or 1440x1080 (HDV non-square pixels).  You don't need much more resolution than that to get a good video image.

Maybe you are looking for

  • How we can replace the column in Core Table plz see this msg

    Hi, How we can replace the column in Core Table plz see this msg Req: when i push the Insert button the data inserted into the Table like Cols Values FOCD      CUFZ14 PRDCD FU6 Month 082008 AgencyCD AG02 PLAN 123 This is FO_Plan Table.... Requirement

  • Issue with Member Formula written for Balance Type

    Folks, I am facing an issue with a member formula written for a balance type dimension, The code says IIF( IsUda([Accounts].CurrentMember, "BalanceSheet"), CASE *WHEN IS([Time].currentmember,[YearTotal]) THEN MISSING* WHEN IsLevel([Time].CurrentMembe

  • VB startup script not running on Win7

    Hi, my startup VB script not working on Windows 7. The script should install or uninstall office 2010 based on group membership.  I tested scipt on Windows XP and everything works. When I run script manually, it works. Quite similiar batch file works

  • EJB 3 Problem: "Collections having FK in secondary table"

    Hi, working with EJB 3 first time, i have to develop my entites by a DB scheme. It is very complex and now I have the problem using composite FK / PK in many tables, so that a refenrenced key has as the same time both properties: FK / PK. Example: +3

  • Attachment to email from java

    Hi. This is the code I use to get the default client and to create an email: Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler mailto:[email protected]?subject=Invio%20file%20JDocException.txt&body=see%20attachment&attachment=fileName")