Quality of generated image

I am creating .gif files using the ACME api and the standard Java 1.41 api. The purpose is to generate images containing text to publish on a website.
This all works fine, but when I create images with fontsize 12 or lower, the quality becomes quite bad compared to the same images created in Photoshop.
Is there a library/API/commercial pack/other wich enables me to create better graphics and font-filters ?
Thanks!

Are you using anti-aliasing when creating the original image? If not, the text quality will definitely suffer at small sizes. Keep in mind, however, that anti-aliasing creates more colors and may not work with ACME's 256 color limit.

Similar Messages

  • Generating images on the fly to use as backgrounds for components

    I am creating an application that has an input number slider with a background image. I would like to change the background image on the slider based on its position (as chosen by the user) using a partial trigger.
    I have successfully been able to do update the background images if I have these images inside of my "Web Content" folder within my JDeveloper project. Instead, I would like to be able to generate the images as needed. These images are color gradients where the start/stop of the gradient is based on the slider's thumb position (as well as other user-defined variables). Because there are many different images that could possibly be created, I am looking into generating the images at runtime rather than have hundreds of images stored somewhere.
    I am trying to generate these images using a BufferedImage that I can then write to a file. The path I am saving it at is as follows:
    FacesContext fc = FacesContext.getCurrentInstance();
    ServletContext sc = (ServletContext)fc.getExternalContext().getContext();
    String path = sc.getRealPath("/") + filename;
    I then create the file at the path and use ImageIO to write it:
    File f = new File(path);
    ImageIO.write(bi, "png", f);
    I am saving this file path in a variable in my backing bean that I then use on my ADF page to populate the background image field of the slider.
    Problem: when I run the page, my slider does not have a background image.
    Looking at the location where the file should be saved, it is actually "saving" it within a .war file which I don't think is appropriate (or possible, for that matter). Is there some way that I can save it either on the server side or the client side so that the client can see the background actually being updated using the generated image? I am almost positive that the path I listed above is incorrect - if this is the correct approach for this problem, where would be an appropriate location?
    Any pointers would be greatly appreciated. Thanks in advance for your help!

    Instead of saving the image to a file, why not use a Servlet to write the image to the Servlet's response stream. Then, you just point the background image to the Servlet.
    John

  • 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 );
    }

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

  • Handling dynamically generated Images

    Hello,
    I have a WDJ application that generates Images dynamically based on certain criterion. The dynamically generated images are put to the server using the code
      BufferedImage image = <rendered image ...>
      File outFile = new File( "Output.jpg") ;
      ImageIO.write( image, "jpg", outFile);
      /** Resource path is not set during the file creation 
       * as ImageIO throws IllegalArgumentException
    It gets saved to the folder <i><drive>\usr\sap\<SID>\JC<InstNo>\j2ee\cluster\server0\output.jpg </i> by default.
    Now, how to show up this dynamically generated image in a Image UI element? I have tried setting the output file name to the attribute that is bound to the "Source" property of the Image UI element but it doosn't show up as WD runtime is doing a look-up in the folder <i>../../../resources/com.test/<projectName>/Components/com.test.<componentName>/</i>
    Any pointers in this regard are highly appreciated.
    Bala

    Hi
    Try this
    Create the alias for the folder (C:\usr\sap\P13\JC00\j2ee\cluster\server0.)
    1.Goto Visual Administrator->Http Provider->Aliases in the Runtime Tab.
    2.Give the Alias Name and Path for the Folder.
    3.The Image sorce like http://<Server>:<Port>/<Alias>/<image>.<ext>
    Kind Regards
    Mukesh

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

  • Low quality pdf generated

    i want to create pdf from uiview but the quality of generated pdf is poor.How can i create high quality pdf.

    Here is my code to create pdf of UIView.
    - (IBAction)drawPdf:(id)sender {
        // Creates a mutable data object for updating with binary data, like a byte array
        NSMutableData *pdfData = [NSMutableData data];
        // Points the pdf converter to the mutable data object and to the UIView to be converted
        UIGraphicsBeginPDFContextToData(pdfData, self.view.bounds, nil);
        UIGraphicsBeginPDFPage();
        CGContextRef pdfContext = UIGraphicsGetCurrentContext();
        // draws rect to the view and thus this is captured by UIGraphicsBeginPDFContextToData
        [self.view.layer renderInContext:pdfContext];
        // remove PDF rendering context
        UIGraphicsEndPDFContext();
        // Retrieves the document directories from the iOS device
        NSArray* documentDirectories = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,YES);
        NSString* documentDirectory = [documentDirectories objectAtIndex:0];
        NSString* documentDirectoryFilename = [documentDirectory stringByAppendingPathComponent:[NSString stringWithString:@"createdPDF.pdf"]];
        // instructs the mutable data object to write its context to a file on disk
        [pdfData writeToFile:documentDirectoryFilename atomically:YES];
        NSLog(@"documentDirectoryFileName: %@",documentDirectoryFilename);
        UIImage *currImage = [self imageByRenderingView];
        NSData *data=UIImagePNGRepresentation(currImage);
        NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
        NSString *documentsDirectory = [paths objectAtIndex:0];
        NSString *filePath = [documentsDirectory stringByAppendingPathComponent:@"pngFile.png"];
        BOOL save=[data writeToFile:filePath atomically:YES];
        NSLog(@"BOOL = %@", (save ? @"YES" : @"NO"));
    //    NSLog(@"path :%@",filePath);

  • Generate image assets from within Smart Object

    Hi,
    When designing for phones I create a large canvas with all screens spread out accross it. Every screen is a Smart Object. To me this has many advantages.
    When editing a screen I open the Smart Object. Now I turn on Generate Image Assets. I notice that no resource folder is created.
    Seems like Generating Image Assets from within a smart object is not possible.
    Is that correct? If so, why isn't the menu option greyed out?
    UPDATE: I found that you can use Generate Image Assets from within a Smart Object. But NOT if the Smart Object is part of a PSD. In other words, only if the Smart Object (psb) is a seperate file.
    I wonder why.
    Cheers,
    H

    Old thread, but I had the exact same problem.  It turns out (on Windows at least), that you can find the generated assets folder for a smart object, but you have to know where to look.
    With the smart object "opened" in Photoshop, click "Save as". This shows the location of the current smart object being edited. For me, it was: C:\Users\Jeff\AppData\Local\Temp\Layer112112121.psb
    And lo and behold, right next to the layer temp file was the image asset output folder with my generated assets in it:
    C:\Users\Jeff\AppData\Local\Temp\Layer112112121 - assets
    You can right-click and "Open in a new window" to get a file explorer window in that folder (see image below).
    (Possibly important note: Close or cancel the Save As dialog, we don't actually want to save the layer to a different location.)
    This location makes sense, but it does seem to be a poor user experience design. Presumably temp files should output their asset folders to the desktop, just like unsaved PSD files.

  • How to display  servlet dynamically generated image ?

    Hi,
    How to display servlet dynamically generated image ?
    I have a servlet generating a buffered image in the doGet. I want to display the image in a jsp page with other information. I'm not able to get it properly displayed.
    **Try n# 1 **************************************************************
    This displays my image but nothing elle :
    ServletOutputStream sos = pResponse.getOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(sos);
    encoder.encode(img);
    **Try n# 2 ****************************************************************
    I tried also :
    In the servlet :
         request.setAttribute("renderedImage", img);
    and in the jsp page :
         BufferedImage image = (BufferedImage) request.getAttribute("renderedImage");
         <img src="<%=ImageIO.write(image,"jpeg",response.getOutputStream())%>" width="300" height="280"/>
    This last try draws big crap in the jsp page, thank you in advance.
    Nelson

    Call another servlet from the IMG tag. Have the servlet stream out the image using ImageIO (instead of writing HTML).

  • CS6 InDesign - Default display is high-quality. Four placed images are Illustrator files. Three images look the way they should - high-quality. One image looks pixelated. Why?

    InDesign CS6 - Default display is high-quality. All four placed images are Illustrator files. Three images look the way they should - high-quality. One image looks pixelated. Why?

    Not sure if this will help, but what is your inDesign file's "Transparency Blend Space" set to? It's under the edit menu.
    Also, when you are placing your images, are you selecting "Show Import Options" and making any selections there?

  • Quality of some images degrading on export

    A customer of ours created a PDF from Indesign CS4 6.0.5 using our custom PDF export presets and noticed that the quality of some of her images degraded or became pixilated jagged however the resolution did not change. They checked the original images and they were fine. The images were layered .psd files, by the way.
    I asked our customer for the original document and I was able to re-create the situation on our end. After much testing, I discovered that this only happens on PDF export. Postscripting and distilling the page gave much improved results. Replacing the images fresh on the page also fixed the problem. After speaking with others here, this is not the first time this has happened.
    Has anyone else had this issue? Is there a setting somewhere that will fix it?
    TIA
    -Travis

    It can definitely be seen on print. It is harder to see on screen. The quality of the image is not stellar to start with. We are a magazine printing company and our export setting are set up to not flatten the PDFs.
    The problem acts like some sort of corruption in the picture box.
    Thanks Bob

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

  • Generate Image Assets crashes Photoshop when making half-size pngs from groups

    I've been getting Photoshop CC to crash consistantly when I try to generate scaled-down pngs from a layer group.  If I have generate image assets on and change a group name to "50% name.png", Photoshop instantly crashes.  If generate assets is off and I change a group name to "50% name.png" Photoshop does not crash until I try turning on generate assets, and then it crashes instantly.  Trying "50% name.png, name_full.png" also fails.  This has occured in different files.  It does not happen in every file or every time, but it happens very often.
    I'm using Windows 8 and Photoshop CC 14.1.1 x64.

    Hi.
    I’ve installed the latest photoshop update (14.2.1 x64). Unfortunately the new update makes me now impossible to use the generator routine. My project needs “decades” longer to realise that I’ve activated the generator in the File menu. I click on Generate->Image Assets and nothing happens… first. After half a minute or so the checkbox eppear finally. You must know: I have more than 100 Layers to be generated to single images. A lot of them are smart objects or groups.
    When I finally save my file to start the generate routine, I needs a lot ( ! ) longer to generate the images than before.
    Additionally my main problem is stil lthere: Impossible to rename any layer or activate the blending menue, while the generator runs.
    So with this update I’ve to wait much much longer to activate or deactivate the generate routine. Deactivating needs a long time too… What have you done there Adobe? (Sorry for this words.)
    @Adobe support: Please contact me personally via mail if possible and I will send you the project file where this problem appear. I can’t publish the file for everybody, sorry guys.
    Do someone knows how to go back to the prevoius installation? Really sad about the generator. A must buy argument and actually a real time saver.

  • Render Quality of still images for Blu Ray?

    Hello,
    can anyone help me on how to control the quality of still images beeing rendered within Encore?
    Transcoding is for film only and on my full HD Blu Ray it seems, that still images or diashows are
    rendered in SD quality at best.
    Any hints appreciated!
    Cheers,
    Guenter

    Hello and thanks for the quick replies and especially the welcome greetings.....
    The images do match the resolution of the videos, they are all 1920x1080.
    I created the images with Photoshop and next to JPG I also tried the PSD,
    but it made to difference.
    They are not part of the videos, they are just pictures I've included using
    the diashow function within Encore. There is no transcode menu available
    for single images nor the diashow.
    The default transcode settings - which are used for video only afaik - are
    also full hd, full quality.
    Any other ideas?
    Cheers,
    Guenter

  • Quality of still images imported from i-Photo

    I've recently got a new Mac, with updated version of i-Movie. Struggling to come to terms with it, but one major problem is quality of still images.
    Whatever I do, they look rubbish in i-Movie. I've tried all sorts of settings, Ken Burns etc, still nowhere near the crystal images on the previous version of i-Movie.
    I've read that we're not supposed to look at quality in i-Movie, but only on burning, but this is a nuisance, and anyhow when I made a Quicktime movie it was no better.
    Can anyone help? And why, when something is supposed to be better, is it actually worse?
    Thanks.
    MacBook Pro   Mac OS X (10.4.5)  

    Adam
    You might try more closely matching the screen resolution of iMovie, which unless you are going widescreen is 720x540... There is not much sense in putting in more dpi than the video format can handle. You can get some distortion when it compresses the images.
    I do find that they never look as good in iMovie on my TV as they did on the computer however. Ken Burns or whatever we try.
    Also, iMovie will stretch smaller than 720x540 images to fit the dimension of the screen, which makes those look truly awful. We usually put those on a black background (in Photoshop) so that they stay at the smaller size.
    Terri

Maybe you are looking for

  • Is that important column order in a query with row_number function

    Hi folks, I am using Oracle 11g R2 on HP-UX machine. I have 2 types of query with row_number and I think they are same but output of each of them are different. I changed only column order in query2. Query 1 : (SELECT "LOOKUP_INPUT_SUBQUERY"."CONTRAC

  • JTable MultiSelection

    I want to enable a multi selection of rows in a table - how do i get the selected rows number? If it is only one row i can recognize it by the click on the table.....should i just do the same operation?

  • HAL Best Practice

    I am trying to utilize HAL for Dimension building with a SQL Server stored procedure as the source. Can't figure out how to return values to they can be mapped to application? Any ideas or better approach to somewhat automated dimension building. Hav

  • Installation error - nothing happens!

    Hello! I downloaded the latest Adobe Reader, and tried install it (under Win7 64bit). But, I can't! If I click the installer file, I see: would you like run (installer.exe)? Naturally, yes. And- nothing. Nothing happens. No error message, no installa

  • Group By - Return single rows

    Hi all. I have the following query: Select FrgnName, dscription, Sum(Quantity) 'Antall' from INV1 A, OINV B, OITM C where A.DocEntry = B.DocEntry and  C.ItemCode = A.ItemCode and B.DocDate = [%0] group by Frgnname, dscription with Rollup order by Frg