Image Quality - how to preserve it?

I have a web application in which I draw into a BufferedImage and Graphics2d created as follows:
BufferedImage bi = new BufferedImage(xlen,ylen,BufferedImage.TYPE_INT_BGR);
Graphics2d g2 = bi.createGraphics();
At this time, I am creating plots that mainly consist of horizonal and vertical lines, filled rectangles and text.
All the coordinate values are full integers, no roundoff.
I then create a jpg image and send it to the output stream of my servlet using the following:
ServletOutputStream sos = response.getOutputStream();
BufferedImage bi = sb.getPlotImage();
response.setContentType("Image/jpg");
ImageIO.write(bi,"jpg",sos);
The image gets transferred to the web component of the same dimensions as the image and the result looks really bad.
I see horizontal and vertical lines occasionally showing up as 2 pixels rather than 1 pixel wide.
And the text looks like hammered fecal matter.
My guess is that the resolution got hammered in either the image compression/transmission/decompression stage.
The question is:
How can I retain the quality of the image?
In the two lines where I convert the image to a jg and send it to the web page
response.setContentType("Image/jpg");
ImageIO.write(bi,"jpg",sos);
I am using jpg images. I am not able to get 'gif' or 'png' image types to work for some reason.
Can anyone suggest something that I can do to retain the original resolution of my drawn images?
I am willing to sacrifice transfer time for image quality.
Any suggestions?

You probably just want to use an effect, whichever one you like best. Select the button, then go to the "Window" menu, and select "Effects" to open the Effects panel. In the bottom left you'll see an "Add Effect" button, click that and experiment with your options.

Similar Messages

  • Transitions & Image Quality: How to Improve?

    I have created an iMovie out of slides with fade in & fade out transitions between slides.
    The issue is that the fade in/out image looks crisper and more clear than the images from which the transitions are derived.
    In fact you can see the slide go "out of focus" or blurry when the fade in transition ends or become clearer when the fade out transition begins.
    This effect is carried over to iDVD as well.
    Any suggestions welcome and appreciated.
    Thanks
    MP

    Hi Michael - yes, you are strongly advised when importing stills, to check the Ken Burns box in the Photos Pane, even if you are not using the zoom/pan effect. Photos rendered by KB are better quality than letting iMovie render them before exporting to iDVD.
    See here - especially read the post by Karl Petersen:
    http://discussions.apple.com/thread.jspa?threadID=196734&tstart=0
    There have been extended discussions on this topic, which as Karl says, can be found by searching the forum (my own quick links to them have been lost due to the new forum structure!).

  • 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.

  • Adobe Premiere Elements 11 - HOW DO I KEEP THE IMAGE QUALITY WHEN I RENDER?

    I'm using Adobe Premiere Elements 11, on a Windows 8 PC and when I "render" still pictures, some videos and simple effects -- they lose quality and get grainy --
    HOW DO I KEEP THE IMAGE QUALITY WHEN I RENDER?

    Molnar are you receiving that error during the download or install process?  Also which operating system are you using?

  • How to prevent degradation of image quality when pasting for collage?

    I am trying to do a collage (of family heirloom old pharmacy jars and bottles) from – eventually – about a dozen separate images in Photoshop CS6.  (A variety of sizes, resolutions, qualities and file types will go into the collage, but I wish to retain the image quality of each component at its original level or very close to the original level, even those in some cases the original quality is marginal.)
    I have set up in Photoshop a “background document” at 300 dpi of the right dimensions to paste into my InDesign document (5.1 X 3.6 cm)
    I have tried >six approaches, all of which have resulted in a degradation of the subsequently pasted-in image (not just slight, but very obvious).
    Clearly I’m missing something fundamental about image quality and handling images so that degradation is minimised or eliminated.
    (1) (1)   Using an internet video as a guide – using Mini Bridge to open all the images in PS6 as tabs along the top of the workpage.  Then dragging the first one into the base document.  It comes across huge – ie I only see a small fraction of the image.  Any attempt to Edit/Transform/Scale (to 14% of the pasted image, which in this case is a jpg of 3170 x 1541 at 1789 dpi, 4.5 x 2.2 cm) results in an image that looks horribly degraded compared with what I pasted (open in another window).
    (2)   (2) Same thing happens if I have each image as a new layer on top of the base document.
    (3)  (3)  I tried changing the image that I had put into Layer 2 into a Smart Object and then resized it.  No further ahead – it still looks horrible.
    (4) using a different image [an 800 dpi JPG 3580 x 1715  Pixels, print size (from dpi) 11.4 x 5.4 cm which despite those parameters is of barely acceptable quality] I have tried (a) changing the resolution to 300 dpi, (b) keeping the number of pixels the same (which results in a dpi of over 3000 but doesn't fix the problem; (c) changing the dimensions to a length of 3 cm [about right for the collage] .... but no matter what I do, by the time the image is positioned correctly on the layer, the image quality has gone from barely acceptable to absolutely horrible. That usually happens during the final resizing (whether by numbers or shift-dragging the corners of the image).
    Grateful for any step-by-step strategy as to how best to accomplish the end – by whatever means.  (Or even in a different program!).  Basically, even though I've used images for many years in many contexts, I have never fundamentally understood image size or resolution to avoid getting into such messes.  Also, I'm on a very steep learning curve with Photoshop, InDesign and Illustrator all at the same time - these all seem to handle images differently, which doesn't help.  [Not to mention MS Publisher, which I'm locked into for certain other things...]

    For the individual images, don't worry about the ppi or as you call it dpi (ppi is the correct term BTW) only worry about the pixel dimensions. If the pixel dimensions gets too low, it will look horrible as there is not enough data to work with.
    Therefore the final document that will house all the other images must be large enough in pixel dimensions to handle the smaller images at a high enough dimension that they will look good.
    That being said, if you can load your images in as smart objects as any scaling that takes place samples the original sized document. Making it possible to scale it down to a size that is barely visible and then reset the size back to where it was and have no loss of data.
    Where the ppi will come into play is when you are ready to print the final document, that is when the ppi will tell the printer at what size to print the document on the page.
    If your collage will span more than one page, you may want to do this in InDesign. All images are linked to their respective container (similar process as smart object in theory) Though I beleive smart objects are embedded which is debatable.
    In both InDesign and Illustrator, scaling the image in the document affects the ppi of the image, scaling down would increase the ppi whereas scaling upward would decrease the ppi as the number of pixels (the pixel dimension) has not changed.
    With photoshop, you have a choice, when scaling the entire document, you have the option to resample the image, doing so affects the pixel dimension and in that instance would degrade the image when scaling downward and bluring the image when scaling up. As photoshop is removing pixels when scaling down and guessing the neighbor pixels should be when scaling upward.
    But, when resampling is off, the pixel dimensions do not change and therefore there is no degration or bluring.
    Why this happens has to do with simple math.
    inches x ppi = pixels
    Knowing any two of the above forumula will give you the third.
    When resampling is enabled, the pixels can change and when it is disabled, it is fixed so only the other two values can change.

  • How can I lower the image quality on a streaming online video

    Hi,
    I have an old iMac G3 with 500 Mhz Power PC and 1 gig of RAM  and running Tiger OS 10.4.11
    I am trying to watch online streaming news through http://www.rentadrone.org but it is, of course, jerky playback.
    My issue is that adobe flash will not let me change the quality of the video to low because the option is grayed out.
    I know that this iMac was prior to videos becoming common online and I know that I have to sacrifice video quality.
    I can play youtube videos well, as in not jerky, in the 240 image quality and wanted to be able to do this through
    other websites with video. I have disabled Dashboard to gain CPU, tried to play the video through Realplayer and
    changed my Display from millions of color to thousands but I haven't been able to stop the jerking on the video.
    Is there a workaround or other solution?
    Thank you in advance for any suggestions or help.

    Each video website has its own controllers over how much choice you have over quality of streaming.
    However, as you use Real Player, you could wait until the video finishes downloading, then click 'Download' in the RealPlayer Download Agent window and watch it offline, when it should play smoother.

  • I've been sent a scan of a document as an attachment. Clicking on it, I get the message, "Pixel aspect ration correction is for preview purposes only. Turn it off for maximum image quality." What is pixel aspect ration and how do I turn it off?

    I've been sent a scan of a document as an attachment. Clicking on it, I get the message, "Pixel aspect ration correction is for preview purposes only. Turn it off for maximum image quality." What is pixel aspect ration and how do I turn it off?

    It's "aspect ratio", not aspect "ration". 
    It's what determines whether you have square pixels ("normal") or, if rectangular pixels, what the aspect ratio (width : length)  of that rectangle is.
    It's explained in the Help files.  I cannot go into more detail because you have neglected to provide information about your platform and exact version of Photoshop.
    Example in next post

  • How do I compress a pdf file without loosing image quality, unlike in preview?

    whenever I compress a file in preview, the image gets compressed but it gets blurred. pls help... how can i retain image quality?

    There are also utilities like PDFCompress and PDFShrink but I cannot speak about the quality of compression.

  • How to export a fireworks file to flash while retaining image quality?

    I created a banner for our website using fireworks cs3. Part of the banner has aimation (basically a slide show of 6 photos). I've tried to export the files by saving the frams to files, but when I do this, the image quality really gets bad. When I try to change the export settings and change the dither, everything but the last frame looks better and the last frame looks like a yellow color is splattered all over it....I've tried just saving the file as an .swf file but when I do so, the file doesn't work when I insert it into my web page, it doesn't work.  Is there a better way to do this?  Can I export as something else then import into flash and still retain my image quality?  Thanks for any input and help!

    How are you inserting the file?
    Flash objects need to be placed in an object tag...as described here: http://kb2.adobe.com/cps/415/tn_4150.html

  • How to prevent PDF presets to alter image quality

    In experimenting with various PDF presets, I noticed that with grayscale images in Photoshop, saving as PDFs using different presets, alters image quality, specifically the contrast. 
    Therefore, it seems like saving an image in the "wrong" PDF preset could undo a lot of prepress work. Is there a better way/format?
    To get a crude idea: there is an 8.7% decrease in the percent black between 10% and 50% values (the range) on a step wedge between the original in Photoshop and the HighQuality PDF, which showed the same values, and the PDF/X-1a, which compressed the range by 4 percentage points (approximately a 8.7% decrease). 
    A visual, and idiosyncratic, assessment of four versions of the same image  (Photoshop grayscale, High Qualtiy PDF, PDF/X-1a, and PDF/X-3), which included a step wedge and color ramp, would rank the fidelity to the original from best, HighQuality, to worst, PDF/X-1a. 
    The same grayscale image in Photoshop CS6 was distilled (File > Print > Adobe PDF) to PDFs using unmodified PDF presets in Acrobat XI distiller.
    The following composit screen shot (all four images on the screen, screen print, reorganizing them, then reducing the image to a 120 dpi at 4.2" wide (including text) gives some idea of the differences, but a lot got lost getting it here. 
    Walton

    I do a lot of work with print-on-demand books (design and formatting), and I am active on the CreateSpace (the p-o-d division of Amazon.com). Although CS will accept work in virtually any PDF preset or origin (doPDF, cutePDF, etc.), PDF/X-1a is the recommended format, and for other companies it is the only accepted preset.
    Here is the dumb question:
    On the monitor (as the screen shot shows) the four images (PS, HQ PDF, PDF/X-1a, PDF/X-4) appear quite different: i.e. my video/monitor system is representing the images differently.
    A screen shot of all four images on the screen at the same time, then with the info window open in Photoshop, I assessed their CMYK values in the exact same places on each image (lining the images up, using the measure tool and  guidelines, measuring at high magnification); here (the color original followed by the original grayscalse conversion) are the black values (C00 M00 Y00 K1-100):
    The images display differently, and those displays measure differently.
    When I view the PDF images, they appear differently, but if i measure them (Output Preview set to Dot Gain 20%) the K values are the same. 
    When the same image is prepared using different PDF presets (a previous set of test using different images and looking for something different) they will print (printed in a black & white book by CreateSpace) differently.
    How can one predict how a grayscale image will print? How can one prepare it and safely convert it to PDF?
    Walton

  • InDesignCC. How to keep image quality with exporting Interactive PDF?

    Hello everyone, I'm using InDesign CC, I'm exporting a PDF that has PNG images, the problem is that I'm loosing the sharpness and the pureness in the images after exporting the file into PDF Interactive... the Settings I'm using for Image Handling are Compression: Automatic , JPEG Quality: Maximum, Resolution PPI: 300..
    The file size is "Letter" with web Intent (792px x 612px) the images I'm using are big and have great quality, can anyone tell me how I export into PDF interactive without loosig images quality? I want to keep this pureness and sharpness in the images
    Thanks in advance

    It depends on the image. Best way for us to advise you is to open your image, then go to Image > Image Size and upload a screen capture of the Image Size box with the readings.
    What you might have working against you is not enough pixels. Upsampling may just make it blurred. But we will see.
    300 ppi is also not carved in stone, you may get away with 200 ppi depending on where you are sending it for printing.
    And lastly, if you are paying a commercial printer to do this, it's best to consult with them and see what they can do.

  • Lightroom export file size: why so small? How can I maximize image quality?

    My image file sizes are much smaller after editing and exporting through Lightroom. Is it impossible to maintain original file size to preserve image quality? Will this smaller file size have negative impact on prints? Any help is appreciated!

    Per Berntsen wrote:
    My view on this is somewhat different ...
    Jpgs should never be edited, except as a last resort. And it defeats the purpose of working with raw files if you export a jpg, and then edit it.
    Agreed. Unfortunately there are many cameras that only output JPEG format files. The camera file (or any other original JPEG file) is your "raw" unedited file inside LR. If you need to send the file to someone else for further editing who doesn't have LR then Exporting with 100% Quality setting might make sense. I say "might" because it's still possible to get very good results using lower Quality setting JPEGs if you only re-save the file one (1) time after further editing. I agree that 16 bit, ProPhoto RGB, TIFF Export files are best for "critical" work and when using 'Edit in Photoshop' from LR.
    I suggest taking a look at the JPEG compression image tests on Jeffrey Friedl's Blog. It's a wealth of information! LR's Quality settings range from 0% to 100% or 100 Quality levels. In reality there are only 13 Quality levels, which are the same as in PS.
    JPEG QUALITY SETTINGS
    Photoshop
    Description
    Lightroom
    0
    Low
    0-7%
    1
    Low
    8-15%
    2
    Low
    16-23%
    3
    Low
    24-30%
    4
    Low
    31-38%
    5
    Med
    39-46%
    6
    Med
    47-53%
    7
    Med
    54-61%
    8
    High
    62-69%
    9
    High
    70-76%
    10
    Max
    77-84%
    11
    Max
    85-92%
    12
    Max
    93-100%
    I use LR JPEG Quality settings of 77-84% for outside printing and LR 62-69% for web posting. I've yet to see any compression artifacts using these settings and I am a pixel-peeper!
    Per Berntsen wrote:
    If someone gives me a jpg to edit, I always save it as a tiff and convert to 16-bit, to minimize furhter deterioration. I realize that this will not be true 16-bit - no information is added to the image - but my impression is that it will withstand heavy editing better, and not end up with a comb-like histogram.
    Why not simply Import the JPEG file into LR and do all your editing non-destructively? There's no need to convert the JPEG file to TIFF unless you need to use LR 'Edit in PS.' Lightroom uses a16 bit/color, ProPhoto RGB, Linear Gamma workspace for all images even when editing sRGB JPEG files.

  • Hi all, my first time on.  I shared my imovie project to Media Browser.  Fine.  Then after it downloaded it 'disappeared.'  Where did it go?  Having found it, how do I then share it with idvd?  I am told the image quality will be much better this route.

    Hi all, my first time on.  I shared my imovie project to Media Browser.  Fine.  Then after it downloaded it 'disappeared.'  Where did it go?  Having found it, how do I then share it with idvd?  I am told the image quality will be much better this route.

    Hi
    I do
    • In iMovie - select a project
    • Share to Media Browser and as Large (not HD or other res.)
    • Close iMovie
    • Open iDVD and select to start a New iDVD Project
    • Import movie - from Media button - down to the right - and here from Movies
    Yours Bengt W

  • How to get good image quality for an icon

    In the constructor of the main class which extends JFrame I set an icon by saying:
    this.setIconImage(new ImageIcon("image.jpg").getImage());
    This does not only set an icon on the title bar and the minimized window, it also creates an icon on my saved files (which are created with JFileChooser and ActionListener). However, the image quality of the icon on my saved files is bad, even though the image quality of the other icons is ok.
    The bad quality image has broken lines where it is supposed to have smooth lines. The size of the image I am providing is close to the size of the icon on my saved files, but the image I am providing looks a lot better (in Photoshop) than the icon.
    How did the icon get created for my saved files? Is it possible to improve the image quality?
    Thanks for looking at this!

    Well, it wasn't Java that created the icon on the saved files. It was the operating system, which used the icon that I had on my executable, once I said "open with" this executable.
    Well, now I am using a better icon maker program from Axialis, which creates icons at different sizes, and the icon on my saved files look perfect.
    Sorry for taking your time thinking about this.

  • How to improve image quality for book

    I recently had a book printed from iPhoto 9 (large, hardcover) and the images in the book seem dull and dark compared to the actual images. For example, in one image of a church taken at dusk you can clearly see the outline of the church, including some details, and even people in front of it - but in the book, this area is completely black. I have had books printed before from iPhoto8 and had been happy with the past results.
    Apple is refunding my purchase and letting me submit the book again, but told me if I don't edit the photos, I may have the same issue (though they also said it could have been a printer issue that day). Customer support did agree that the image quality itself is good. So, my question is, before I resubmit this book - in general, what attributes or combination of attributes are best to change to make the images more vibrant and not dark when printed for the book (ie. increase color saturation and exposure?)
    Thank you.

    Thanks. I did indeed preview the book before, and I have followed their tips. As, I said, I have purchased several books in the past and no issue. Apple even sent a couple pictures back to me as an attachment to show what they received, and they matched what I sent, but NOT what was printed. What printed is definitely much darker and in many cases you can't even make out the detail that you could in the images (including the ones they sent back to me for comparison). Maybe the printer really was off. I'll try a few enhancements and try again.

Maybe you are looking for

  • OIM AD Connector (AD 9.1.1.4) Error

    Hi experts, We are configuring the connector MS AD 9.1.1.4 for OIM 9.1.0.2 BP07 on WebLogic 10.3.0. BD 10g (10.2.0.4). MS AD 2003. But when we try to execute the AD Group Recon Lookup, the following error happens : This are the values that we are pro

  • Creating a Business Partner in CRM 5.0

    When I'm tryin to create business partner of type person in CRM 5.0, i'm getting following error "Run report CRM_MKTBP_ZCACL_UPDATE_30 first" what is this report for? What are steps and/or configurations needs to be there before creatign business par

  • SQL Injection concerns

    I have been studying sql injection attacks and the mysql_real_escape function. I read the adobe technote about sql injection and it noted that Dreamweaver 8.0 incorporates anti-sql injection code to prevent attacks and it specifically refers to Add,

  • How can i get the previous date?

    Hi, I am entering a future date(xx-xx-xxxx) through my application.I need to perform some actions on the previous date of the entered date(xx-xx-xxxx).How can i get that previous date?

  • Lion - Turn Off Eye Candy, Visuals, Extra Effects

    Hi, Apple, please listen. I just want to work on my iMac with Lion. All these animated visuals, eye candy, and extra effects are quite annoying. How does one control these or turn them off? DJ