Save TIFF file loses quality

Hi all! I'm facing this issue: I have to write something on an image (a rectangle and some words inside it) with different colors. I take the image from the imageIcon in which it is painted and I create a new BufferedImage Which I write over. I use this code:
BufferedImage bi = new BufferedImage(imageIcon.getIconWidth(), imageIcon.getIconHeight(), BufferedImage.TYPE_INT_RGB);
    Graphics2D imageGraphics = bi.createGraphics();
    imageGraphics.drawImage(imageIcon.getImage(), 0, 0, null);
    imageGraphics.setColor(Color.RED);
    imageGraphics.setFont(new Font("Arial", Font.BOLD, 30));
    imageGraphics.drawString("Vistato Da: " + JDoc.JDoc.getUser(), 210, 40);
    imageGraphics.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
                       RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
    imageGraphics.setRenderingHint(RenderingHints.KEY_FRACTIONALMETRICS,
                       RenderingHints.VALUE_FRACTIONALMETRICS_ON);
    imageGraphics.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
                         RenderingHints.VALUE_ANTIALIAS_ON);
    imageGraphics.setRenderingHint(RenderingHints.KEY_ALPHA_INTERPOLATION,
                         RenderingHints.VALUE_ALPHA_INTERPOLATION_QUALITY);
    imageGraphics.setRenderingHint(RenderingHints.KEY_COLOR_RENDERING,
                         RenderingHints.VALUE_COLOR_RENDER_QUALITY);
    imageGraphics.setRenderingHint(RenderingHints.KEY_RENDERING,
                         RenderingHints.VALUE_RENDER_QUALITY); 
    imageGraphics.setRenderingHint(RenderingHints.KEY_DITHERING,
                         RenderingHints.VALUE_DITHER_ENABLE);   
    imageGraphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
                         RenderingHints.VALUE_INTERPOLATION_BICUBIC);     
    imageGraphics.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL,
                         RenderingHints.VALUE_STROKE_PURE);
    imageGraphics.drawString("Note: Tutto ok", 210, 140);
    BasicStroke wideStroke = new BasicStroke(8.0f);
    imageGraphics.setStroke(wideStroke);
    imageGraphics.drawRect(0, 0, 550, 200);   
    imageIcon=new ImageIcon(bi);
    try{
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ImageIO.write(bi, "tiff", baos);
      this.imgArray = baos.toByteArray();
    //Save the file through a FileOutputStreamThe problem is that I experience a worsening in the resultant image quality..
May someone explain to me what should I do to have a better quality?
Thanks very much!!

The same answer applies to any kind of file.
You need a Digital Rights Management solution. Very expensive.

Similar Messages

  • Tiff Viewer which disables print, copy and save TIFF file

    I am looking TIFF Viewer solution which woul disable any print, save and copy functions for a TIFF file. Thisfunctionality is available for PDF but I need to disable print, copy and save for TIFF files.
    Would anyone know a TIFF viewer or solution that supports the following functions:
    1)      TIFF viewer where we can turn off any options to print the TIFF file or save it to disk.  That would include disabling any options where the user could right click on the TIFF and save the file somewhere else.
    2)      It would need to be able to open multi-page TIFFs. 
    3)      It would be nice if the TIFF viewer could be run on both Mac and Windows platforms.
    I need to send files to users for view only, and these should be in TIFF fomat, not converted into a PDF.
    Thank you for your help.
    Regards,
    Sapna

    The same answer applies to any kind of file.
    You need a Digital Rights Management solution. Very expensive.

  • G4 Compression for TIFF file

    I am looking for a plug in to allow Photoshop to save TIFF files using G4 Compression on a Windows PC.  We have CS3, CS4 and CS5. 
    The TIFF files start as color and than we knock all the background out and it leaves just solid black and white in the image.  We have an aftermarket product to convert the TIFF images to G4 compressed TIFF images but I would much rather convert them in Photoshop because we can integrate the process into our scripting.  As we run this on ~100,000 files a month any little speed helps us a lot. 
    Thank you, -Dan

    I am looking for a plug in to allow Photoshop to save TIFF files using G4 Compression on a Windows PC.  We have CS3, CS4 and CS5. 
    The TIFF files start as color and than we knock all the background out and it leaves just solid black and white in the image.  We have an aftermarket product to convert the TIFF images to G4 compressed TIFF images but I would much rather convert them in Photoshop because we can integrate the process into our scripting.  As we run this on ~100,000 files a month any little speed helps us a lot. 
    Thank you, -Dan

  • How many times can you "Export - Quicktime movie" the same ProRes 422 file until it starts to lose quality?

    Lets say you are done with your project & you want an uncompressed copy of it as your master. If you keep importing it back into Final Cut Pro, & keep exporting (Quicktime movie), will it ever start to lose quality?

    I've never seen a number given, but would think it is very high.
    Apple describes ProRes here:
    About Apple ProRes
    And in that document says:
       "while remaining visually lossless through many generations of decoding and reencoding."
    I don't think I've ever seen degradation caused by recompression or multiple compassion, but as a workflow if you output a master file, then re-import it to add graphics and export that, you would only be 1 generation down from the master file. If you wanted to make multiple versions, you can always go back to, and re-import,  the master file and make the changes, then export, so all you exports stay only 1 generation down from the master file.
    MtD

  • How do I get PSE 12 to save a TIFF file with file extension ".tiff" instead of ".tif"?

    I am using PSE 12 as an external editor for Aperture.  When I ask to use an external photo editor, Aperture creates a .tiff file in my Aperture folder, launches PSE 12 and tells it to edit that .tiff file.  This all works great.  When I am done editing in PSE 12, I ask it to save the file and it saves it back to the original Aperture folder with a .tif extension.  I can instead say "save as" and then it suggests the file name with a .tif extension.  When I correct the extension to .tiff it warns me that I'm going to overwrite the file (exactly what I want!).  I say yes and then I find out that PSE did not overwrite the file, but wrote it as a .tif file anyway.  I have to go to the folder, delete the .tiff file and rename the .tif file to .tiff and then everything is fine - but what a hassle.  Has anyone solved this problem?

    That's not quite where the problem lies, which is good, because you can't change that. The real solution is that you don't ever want to see the save as window in PSE if you are using PSE as external editor for any program. When you see it you aren't creating a version for your asset management program. Go to the PSE preferences>saving files>on first save and choose to save over existing file. That should do what you want.

  • Save as a 16 bit TIFF file for Enlarging?

    Question, a local photo developer told me that if I wanted to develop my photos at something like 16 x 20 or larger I should save my photos as a 16 bit TIFF file. Elements 4.0 does not seem to allow me to set the bits at 16, just 8. Is there any truth to what they are saying?
    Also isn't the file size going to be massive when doing this. Most likely prohibiting an upload to their site?
    I am shooting with a Nikon D50 in RAW format. Obvioulsy I have to open it in Elements from Camera Raw as an 8 bit photo to save it in either TIFF or JPEG format.
    Any comments are appreciated.

    Thank you for your comment.
    When I save the 16 bit file in ACR it saves it as a .dng file. When I open the .dng file in Elements again the raw editor opens it as a 8 bit file automatically. This may be all well and good if I can have enlargements made with this file type but not good if what the developer is telling me is true. ???????

  • No option in adobe reader 9.2 when opening a pdf file to "save as" a tiff file

    Hi, I want to save a pdf file as a tiff file.  I have Adobe Reader 9.2 and windows xp.  In the Adobe website, it says I can export or convert a pdf file into different formats.  However, when opening an existing pdf file, there isn't an option to export or "save as" in the Tools menu or in the Preferences under Edit.  The reason I want to save a pdf file into a tiff file format is because when I use the program Microsoft Office Document Imaging to open a tiff file, it allows me the option to move selected pages & save it as a new file.  In a pdf file, I have to save all the pages as one file & I don't necessarily want all the pages.   My only other option is to print the selected pages I want from the adobe file document and then scan it into a tiff file but I would hate to use paper just for that purpose.
    Any help is appreciated.
    Thanks,

    You can use a tiff printer driver:
    http://server3.nethost.co.il/set_tif.html

  • Edits to a JPG Smart Object  in a layered TIFF file:  DOES NOT Save to the originally placed file?

    When placing a JPG as a Smart Object (and even multiples) into a layered TIFF file:  If I open each layered Smart Object JPG, make changes as a JPG and SAVE the file, I expect the ORIGINAL SOURCE JPG file that was placed to also be saved- I thought that is the file I was editing!
    This SUCKS!  To capture my edits to the original individual files:  I now have to open each layed TIF file, Edit each smart object JPG and SAVE AS to overwrite the original and capture my changes?  Is this the way its always been- I don't think it has.  How can I edit a Smart Object file in a layered document and ALSO update the SOURCE file?

    You should edit the original jpg, and then replace the smart object. There is a utility that makes this easier, if you do many of these. Looks liek this
    link_update.zip

  • How to save raw images as TIFF files on Adobe Bridge?

    I am trying to upload my raw images from my camera onto Adobe Bridge and save them as a TIFF file. But it does not give me that option and simply automatically saves them as JPEGs.
    Where is the option to keep them as raw, large TIFF files?

    This is the Adobe Reader forum.  Your question is concerning about what software?

  • How do I maximize quality of tiff files in Adobe PP cs6

    Hi.
    I'm importing tiff files 3528 x 3630 pixels, 24 bit depth, into Premiere Pro cs6, and then scaling to frame in cs6.
    Would the quality be any better if I downsized them outside of cs6 and if so what would be a good program to do this in.
    The best results I've had with exporting in terms of quality have been with the f4v format.
    avi, mp4, and all the other ones are quite lossy. And there is little improvement when I alter the codec or bit depth, so I assume either I'm doing something wrong or the tiff files arent simpatico with the cs6 system.
    What is the best way to maintain the integrity and high quality of the original images?
    Any help would be much appreciated.

    As Fuzzy says, perhaps if we saw your export settings it would be useful.
    Also, you say you are scaling the 3528 x 3630 images to frame size. What is that frame size. For extremely technical reasons, that could actually matter.
    We have the image size, we need the frame size of the sequence, and the frame size of the export. With all three, I believe we can assist you in selecting the correct output method. Can we assume that the lossless version is for archiving?
    Exporting to an uncompressed codec is easy. (Actually that is a silly statement on my part, if it is uncompressed, there is no codec because there is nothing compressed to decompress!) The problem might be that playing back an uncompressed video stream is extremely difficult for most PCs.  You might only be able to use the uincompressed video in a program like Premiere Pro or After Effects.
    By the way, how do the Vimeo and YouTube videos look? Are they of sufficient quality for distribution?
    Off topic question: Where did you get tiff files of that size and depth? Is that what your camera records?

  • How do I save a file as an uncompressed TIFF grayscale at 300 dpi or higher?

    I need to save a file as an uncompressed TIFF grayscale at 300 dpi or higher for a photo entry to a magazine.  How do I do that?

    Use menu Image>Image Size in the image size dialog uncheck Resample and enter 300 in the resolution field and click OK.  Note no Pixels are changed only the resolution setting get changed.  The use Menu Fils>Save As in the save as dialog use the file type pull down and select Tiff then click Save
    In the Tiff Option Dialog in the Image Compression  section set None The click OK.

  • PSE 12 won't save the tiff file over the original, but brings up save as window

    I've solved (or had help) solving this problem before:
    http://forums.adobe.com/message/5893872#5893872
    I am using PSE 12 as a photo editor for Aperture 3.5.1 and the photo is duplicated (as a tiff) in Aperture and PSE editor opens with the image.  When I close the file and say to save the file it brings up the save as window.
    The fix from the earlier discussion worked fine at first, but now, even though I tell PSE 12 to "on first save -- save over current file" it now brings up the "save as" window and won't save over the file (changes the file type from .tiff to .tif)
    Has something changed?
    Dave

    Go to the editore preferences>general, click this button and restart the editor, then try again (You will need to reset the saving files pref first):

  • JSX Save PNG for web, quality parameter not changing file size

    Hi
    I have a script that uses this snippet of code to save png files for web. But, no matter what number I change the quality, the resulting file size and image fidelity remains the same.
    I was wondering if I can save pngs for web at smaller byte size with JSX and how to modify the output settings.
    docName = sourceDoc.name;
    NamesaveRef = new File( outputFolder + "/" + docName );
    var NewfileRef = new File( NamesaveRef )
    var options = new ExportOptionsSaveForWeb();
    options.format = SaveDocumentType.PNG;
    options.transparency = true;
    options.blur = 0.0 ;
    options.includeProfile = false ;
    options.interlaced = false ;
    options.optimized = true ;
    options.quality = 3 ;//THIS NUMBER DOES NOT CHANGE QUALITY IF CHANGED FROM 0.1 TO 100
    options.PNG8 = false ;
    sourceDoc.exportDocument(File( NamesaveRef), ExportType.SAVEFORWEB, options);
    app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
    Thanks for your help.
    Aubrey

    PNG does not have a quality setting. The quality property is used when exporting jpeg. That is why changing that property has no effect with PNG files.
    Photoshop now supports PNG compression but as far as I can tell you have to use Action Manager to save. I don't see a compression option when using saveForWeb.

  • I try to save a pdf as a tiff file and get the message the image is to wide to output?

    I am trying to save a map I have in PDF format as a Tiff file. When I "save as other - image -tiff I get the message:

    If it is a map, you likely already have a bit map. In that case use Export all Images to get the original bitmap back.

  • How I can export files from CS5.5 to send for further editing in CS6 and no lose quality?

    how I can export files from CS5.5 to send for further editing in CS6 and no lose quality?

    If all you need for further editing is the contents of your Timeline,
    then you should follow Harm's sage advice.
    Lagarith Lossless Video Codec
    http://lags.leetcode.net/codec.html
    Ut Video Codec Suite
    http://www.videohelp.com/tools/Ut-Video-Codec-Suite
    But, if you will need all of your source media files to continue the edit,
    you should consider using the Project Manager.
    Trim or copy your project
    By using the Project Manager, you will be continuing the edit
    with the original media files and there will be no quality loss.
    Be aware that once you have edited the project in CS6,
    it will be problematic (but not impossible) to return to edit in CS5.5.

Maybe you are looking for