Jpeg and bmp image

Hiiii,
I m trying to display a jpeg image on a component but i am not able to do so...............i am able to do with agif one ,,,,,,,is thr any diff approach for jpeg?
can any body give me some codelines reg this....

public void paintComponent(Graphics g){
  g.drawImage(myImage, 0, 0, this);
}

Similar Messages

  • Why java only can display GIF file not jpeg and BMP ??

    Did anyone know why java only can display GIF file not in jpeg and BMP ?? This is because the quality of GIS is not as good as Jpeg and BMP
    any code to load the display process ??
    thx guys !!!

    you can do jpegs but im not sure about bmps.
    The only thing ive noticed is that java cant support transparent jpegs, only transparent gifs
    Jim

  • I saved my design as a jpeg and the image is off-center of a larger white frame

    I created a document in Illustrator, as I have many times before.  I save it as an AI file and I export it as a .jpeg for my use.  When I open the .jpeg file, my 8X11 design appears to be in the right hand side of a larger page.  The document is set up to be 8X11. Where does this white band on the left come from and how do I get rid of it?  It does not show in the AI design.

    Chipleen33 wrote:
    The subsequent posts I showed the screenshot in AI...
    Yes, but it's a screenshot of the JPEG reopened in AI; not the original Illustrator artwork prior to export. See?
    Again, the questions in posts 1 and 2 asked about whether there is something unseen in your original Illustrator artwork prior to export (not the JPEG) which would have the effect of extending your exported JPEG's canvas, as has happened. With the original Illustrator artwork open, selecting all or viewing in Outline mode would help you detect the unseen object(s) and delete them, which would solve your problem.
    You appear (according to the screenshot) to answer the question based on reopening the JPEG and concluding: "Yes, when I select all the whole thing is included..." Of course it is. It's a single image. By opening the JPEG instead of the original Illustrator artwork, you fouled the experiment. I was just pointing that out.

  • Jpeg and gif images are not fuzzy

    How can I import jpeg and gif files so that they are crisp and not fuzzy?  I have Lifecycle Designer 7.0
    T

    Look at the bottom of this page as well [http://carlback.blogspot.com/2007/12/apex-and-3rd-party-js-libraries.html]
    Patrick Wolf
    Carl,
    the only drawback with #WORKSPACE_IMAGES# and #APP_IMAGES# is that it doesn't get cached by the browser. So each page request will transmit the hole file again. A caching option for the "Static Files" in the Shared Components would be nice :-)
    About lazy loading with the #WORKSPACE_IMAGES#. I could think about a mod_rewrite rule which translates the additional file request of the JS library into a valid request for APEX.
    Carl Backstrom
    In 3.1 we emit a last modified header now for uploaded files so that should help with browser caching.
    I wonder if anything's changed since then.
    Kofi

  • Saving Excel file as JPEG or BMP image

    Hi,
    i need a solution how to save an Excel file as jpg or bmp format.Please help me out in this. it is very urgent. i am passing an Excel file as input and it should be converted into a image.
    Thanks,
    chandras.

    Hi,
    I tried in google. i used POI. But i didnot get.Your Google skills aren't very good, then. I typed "convert excel to bmp" into Google and got a whole lot of programs and services that say they can do it. Probably the idea that it's urgent is preventing your brain from working properly. Try to not panic.

  • Imbeded jpeg and jpg images don't display in email. It works when I use the Chrome browser. I'm running att.yahoo. mail. I have reset firefox, also reinstalled.

    I tried recommendations that I understood in this forum to no avail. I tried resetting Firefox. Then I uninstalled and reinstalled. It still doesn't work. It used to work all the time. Now it works once in a great while. Instead of showing as an image in the email it shows as an attachment at the top of the email with the option of slideshow. If you click on the picture it sometimes will appear, more often than not it will not. It works every time when using the Chrome browser.

    If images are missing then check that you aren't blocking images from some domains.
    *Press the F10 key or tap the Alt key to bring up the hidden "Menu Bar" temporarily.
    *Check the permissions for the domain in the currently selected tab in "Tools > Page Info > Permissions"
    *Check "Tools > Page Info > Media" for blocked images
    *Select the first image link and use the cursor Down key to scroll through the list.
    *If an image in the list is grayed and "<i>Block Images from...</i>" has a check-mark then remove this check-mark to unblock images from this domain.
    Make sure that you do not block (third-party) images, the permissions.default.image pref on the <b>about:config</b> page should be 1.
    Make sure that you haven't enabled a High Contrast theme in the Windows/Mac Accessibility settings.
    Make sure that you allow pages to choose their own colors.
    *Tools > Options > Content : Fonts & Colors > Colors : [X] "Allow pages to choose their own colors, instead of my selections above"
    Note that these settings affect background images.
    See also:
    *http://kb.mozillazine.org/Website_colors_are_wrong
    There are extensions like Adblock Plus (Firefox/Tools > Add-ons > Extensions) and security software (firewall, anti-virus) that can block images and other content.
    See also:
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    *http://kb.mozillazine.org/Images_or_animations_do_not_load
    *http://kb.mozillazine.org/Websites_look_wrong

  • Loading a tiff and bmp image in a JLabel

    Does anybody knows how to do it in version 1.4.1 ?

    First you need this class as a bitmap loader.
    import java.io.*;
    import java.awt.*;
    import java.awt.image.*;
    public class BitMapLoader
    private BitMapLoader() {}
    /** Create a Java Image from the named file.
    * @param sdir, names the directory,
    * ending with the separator character.
    * @param sfile, names the file,
    * @param comp, any Component as ImageObserver. */
    public static Image loadbitmap (String sdir, String sfile, Component comp) throws FileNotFoundException
    System.out.println("loading:"+sdir+sfile);
    return loadbitmap (new FileInputStream(sdir+sfile), comp);
    /** Create a Java Image from the open stream.
    * @param fs, the open stream.
    * @param comp, any Component as ImageObserver.
    public static Image loadbitmap (InputStream fs, Component comp)
    try
    Image image;
    int bflen=14; // 14 byte BITMAPFILEHEADER
    byte bf[]=new byte[bflen];
    fs.read(bf,0,bflen);
    int bilen=40; // 40-byte BITMAPINFOHEADER
    byte bi[]=new byte[bilen];
    fs.read(bi,0,bilen);
    // Interperet data.
    int nsize = (((int)bf[5]&0xff) << 24)
    | (((int)bf[4]&0xff) << 16)
    | (((int)bf[3]&0xff) << 8)
    | (int)bf[2]&0xff;
    int nbisize = (((int)bi[3]&0xff) << 24)
    | (((int)bi[2]&0xff) << 16)
    | (((int)bi[1]&0xff) << 8)
    | (int)bi[0]&0xff;
    int nwidth = (((int)bi[7]&0xff) << 24)
    | (((int)bi[6]&0xff) << 16)
    | (((int)bi[5]&0xff) << 8)
    | (int)bi[4]&0xff;
    int nheight = (((int)bi[11]&0xff) << 24)
    | (((int)bi[10]&0xff) << 16)
    | (((int)bi[9]&0xff) << 8)
    | (int)bi[8]&0xff;
    int nplanes = (((int)bi[13]&0xff) << 8) | (int)bi[12]&0xff;
    int nbitcount = (((int)bi[15]&0xff) << 8) | (int)bi[14]&0xff;
    // Look for non-zero values to indicate compression
    int ncompression = (((int)bi[19]) << 24)
    | (((int)bi[18]) << 16)
    | (((int)bi[17]) << 8)
    | (int)bi[16];
    int nsizeimage = (((int)bi[23]&0xff) << 24)
    | (((int)bi[22]&0xff) << 16)
    | (((int)bi[21]&0xff) << 8)
    | (int)bi[20]&0xff;
    int nxpm = (((int)bi[27]&0xff) << 24)
    | (((int)bi[26]&0xff) << 16)
    | (((int)bi[25]&0xff) << 8)
    | (int)bi[24]&0xff;
    int nypm = (((int)bi[31]&0xff) << 24)
    | (((int)bi[30]&0xff) << 16)
    | (((int)bi[29]&0xff) << 8)
    | (int)bi[28]&0xff;
    int nclrused = (((int)bi[35]&0xff) << 24)
    | (((int)bi[34]&0xff) << 16)
    | (((int)bi[33]&0xff) << 8)
    | (int)bi[32]&0xff;
    int nclrimp = (((int)bi[39]&0xff) << 24)
    | (((int)bi[38]&0xff) << 16)
    | (((int)bi[37]&0xff) << 8)
    | (int)bi[36]&0xff;
    //System.out.println("Colors important are :"+nclrimp);
    // No Palatte data for 24-bit format but scan lines are
    // padded out to even 4-byte boundaries.
    if (nbitcount==24) {
    int npad = (nsizeimage / nheight) - nwidth * 3;
    int ndata[] = new int [nheight * nwidth];
    byte brgb[] = new byte [( nwidth + npad) * 3 * nheight];
    fs.read (brgb, 0, (nwidth + npad) * 3 * nheight);
    int nindex = 0;
    for (int j = 0; j < nheight; j++) {
    for (int i = 0; i < nwidth; i++) {
    ndata [nwidth * (nheight - j - 1) + i] =
    (255&0xff) << 24
    | (((int)brgb[nindex+2]&0xff) << 16)
    | (((int)brgb[nindex+1]&0xff) << 8)
    | (int)brgb[nindex]&0xff;
    /* System.out.println("Encoded Color at ("
    +i+","+j+")is:"+" (R,G,B)= ("
    +((int)(brgb[2]) & 0xff)+","
    +((int)brgb[1]&0xff)+","
    +((int)brgb[0]&0xff)+")");*/
    nindex += 3; }
    nindex += npad; }
    image = comp.createImage
    ( new MemoryImageSource (nwidth, nheight,
    ndata, 0, nwidth));
    // Have to determine the number of colors, the clrsused
    // parameter is dominant if it is greater than zero. If
    // zero, calculate colors based on bitsperpixel.
    else if (nbitcount == 8) {
    int nNumColors = 0;
    if (nclrused > 0)
    nNumColors = nclrused;
    else
    nNumColors = (1&0xff) << nbitcount;
    // Some bitmaps do not have the sizeimage field calculated
    // Ferret out these cases and fix 'em.
    if (nsizeimage == 0)
    nsizeimage = ((((nwidth*nbitcount)+31) & ~31 ) >> 3);
    nsizeimage *= nheight;
    // Read the palatte colors.
    int npalette[] = new int [nNumColors];
    byte bpalette[] = new byte [nNumColors*4];
    fs.read (bpalette, 0, nNumColors*4);
    int nindex8 = 0;
    for (int n = 0; n < nNumColors; n++) {
    npalette[n] = (255&0xff) << 24
    | (((int)bpalette[nindex8+2]&0xff) << 16)
    | (((int)bpalette[nindex8+1]&0xff) << 8)
    | (int)bpalette[nindex8]&0xff;
    /* System.out.println ("Palette Color "+n
    +" is:"+npalette[n]+" (res,R,G,B)= ("
    +((int)(bpalette[nindex8+3]) & 0xff)+","
    +((int)(bpalette[nindex8+2]) & 0xff)+","
    +((int)bpalette[nindex8+1]&0xff)+","
    +((int)bpalette[nindex8]&0xff)+")");*/
    nindex8 += 4;
    // Read the image data (actually indices into the palette)
    // Scan lines are still padded out to even 4-byte
    // boundaries.
    int npad8 = (nsizeimage / nheight) - nwidth;
    //System.out.println("nPad is:"+npad8);
    int ndata8[] = new int [nwidth*nheight];
    byte bdata[] = new byte [(nwidth+npad8)*nheight];
    fs.read (bdata, 0, (nwidth+npad8)*nheight);
    nindex8 = 0;
    for (int j8 = 0; j8 < nheight; j8++) {
    for (int i8 = 0; i8 < nwidth; i8++) {
    ndata8 [nwidth*(nheight-j8-1)+i8] =
    npalette [((int)bdata[nindex8]&0xff)];
    nindex8++; }
    nindex8 += npad8; }
    image = comp.createImage
    ( new MemoryImageSource (nwidth, nheight,
    ndata8, 0, nwidth));
    else
    System.out.println ("Not a 24-bit or 8-bit Windows Bitmap, aborting...");
    image = (Image)null;
    fs.close();
    return image;
    catch (Exception e)
    System.out.println("Caught exception in loadbitmap!");
    System.err.println(e.getMessage());
    e.printStackTrace();
    return (Image) null;
    }Then in your class that displays the JLabel, do this..
    JLabel label = new JLabel();
    Image bitmapImage = BitMapLoader.loadbitmap(dir, filename, label);
    label.setIcon(new ImageIcon(bitmapImage));
    ..

  • Jpeg and animated gif's

    Hi. Does anybody know how to put an *.jpeg image and an animated gif
    on the front panel of a VI?
    I would be greatfull for any help.
    Vlad

    "Ioan Vlad Dragomir" wrote:
    >>Hi. Does anybody know how to put an *.jpeg image and an animated gif >on
    the front panel of a VI?>>I would be greatfull for any help.>Vlad
    Hi Vlad
    Have a look at the ""Example Programs Database ""
    Reading from JPEG/PNG/BMP Images into a LabVIEW Picture Control.
    http://digital.ni.com/explprog.nsf/75c7cd5de6d387788625663d00558a4c/ab8e1f3913731e208625677d0076acd6?OpenDocument
    This VI will give you a good example of how you can display a *.jpeg
    Hope that help.
    Rejean

  • Importing JPEG and TIFF

    I have some jpeg and tiff images on a disc. I saved the images to my desktop and then imported them into FCP. The problem is that some of the files seem to be bad. Some have a red horizontal line through them and some have blue lines through them. I checked it on another computer and they read fine. I tried saving the images to the desktop a second time but now different images are bad. FCP will not read the bad files.
    Any thoughts?

    I have some jpeg and tiff images on a disc. I
    saved
    the images to my desktop and then imported them
    into
    FCP. The problem is that some of the files seem to
    be
    bad. Some have a red horizontal line through them
    and
    some have blue lines through them. I checked it on
    another computer and they read fine. I tried
    saving
    the images to the desktop a second time but now
    different images are bad. FCP will not read the
    bad
    files.
    Any thoughts?
    Bad quality when looking at the pictures via the
    canevas on the computer or via an external screen ?
    The RGB check is a really good idea. I would also consider putting the images on an external media file. The fact that FC is looking on the system drive could be causing some of the problem.

  • Have been trying to export versions to a friend in the UK as JPEG. He receives them as bmp and no Metadata. Tried all the JPEG settings in  Image Export with no success.

    Have been trying to export "versions to a friend in the UK as JPEG. He reseives them as bmp with no Metedata. Have tried all the JPEG settings in Image export with no success.
    Nelson

    Ernie-
    Thanks for responding...but still have a oroblem. Here's what I'm doing:
    In Aperture I choose a "version" that has been Adjusted (croped, etc.).
    - Go to "File"...'Export"..."Version"
    - In next window for "Export preset" I choose "JPEG-Fit within 1024x1024"
    - Click on "Export version"
    The exported version then showes up in "Finder" under "Pictures"
    - Next I open "Mail" (version 5.2)
    - Adderss email to friends in England.
    - Click on attachment (paper clip)
    - Choose my "version" from "pictures"
    - Back in Mail, click on "Format"..."Make Plain Text"
    - Send
    My friends receive it as "bmp", not JPEG, with no Metadata.
    If I do the same procedure but under "File" choose "Export Master", they receive it as JPEG and also the Metadata.....BUT, of course, no Adjustments, such as croping, that were made to the "Version".
    What am I doing wrong? Is there any way to save the "Version" as a "Master" and then send it as a "Master"?
    Thanks,
    Nelson

  • I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from

    I am trying to use photomerge compose.  I open one standard jpeg image and one image that is my business logo in a png format.  When I select the png image, to extract the logo from it, it appears as all white and will not allow me to select the logo from it.  It has worked in the past but I downloaded the update today and photomerge will not work correctly.  Any ideas?

    hedger,
    How do you expect anyone to help when we don't know a darned thing about the file, abut your setup, exact version of Photoshop and your OS, machine specs, etc.?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • Print images in PNG and BMP formats

    I have converted images from xwd to bmp by using JAI. now I want to print them.
    How can I print PNG and BMP Files? How can I read images in different formats and make them print.
    Please help me !

    JAI follows the Java 2D printing model. All you need to do is to read your PNG, BMP images as RenderedImage, Renderable, or BufferedImage objects. To print an image, draw the image object on the printer's graphics context using one of drawImage(), drawRenderedImage(), and drawRenderableImage() methods of the Graphics2D class.
    I have some sample code at http://www.geocities.com/larryhr/samplecode/samplecode.html. See the Printing section. JAIImagePrint.java should give you some indication as to how to print images read by the JAI codec.

  • JPEG/PSD issue--I open a jpeg and edit it (levels, crop) and then "save as" and the save as option shows there are now levels in the image and it wants to save it as a .psd file or a copy with layers.  What am I doing that has these settings appear?

    JPEG/PSD issue--I open a jpeg and edit it (levels, crop) and then "save as" and the save as option shows there are now levels in the image and it wants to save it as a .psd file or a copy with layers.  What am I doing that has these settings appear?

    16bit? Pixels extending beyond the canvas? (from a crop with delete unused pixels turn off).  Have you previously been saving PSD files?
    IME you sometimes have to tell Photoshop that the first save of a session is JPG, and it remembers from there on.  The way to 'tell' Photoshop that JPG, or PDF, or PNG etc are now your preferred format is to Ctrl (Cmd) click on that format in the Save As drop down list.  So long as the file does not have parameters that your chosen format does not support, then this should work for you.
    [EDIT]  Just noticed that you did include 'Crop' in the subject line.  Do you have 'Delete cropped pixels' checked?

  • Is there a way to save an image file as a jpeg and add -web or -print to the file name?

    I am trying to find a way to save my image file as a jpeg and add -web or -print to the existing file name.  This way I can easily see which files are lower resolution for web posting or high resolution for printing.

    Jason,
    I helped somebody do a very similar thing about a week ago.
    The trick is to use the Batch command's ability to construct a file name.
    Tell the batch to append, e.g. "-x" without quotes, to the name of each saved file.
    The batch runs an Action which does a save as JPEG, resize image, add logo, save as JPEG, then close document.
    The output is "<document name>-x.jpg" and "<document name>-x-x.jpeg".
    Then use Windows Explorer to rename "*-x-x.jpg" to "*-print.jpg".
    Then rename "*-x.jpg" to "*-web.jpg".
    See http://forums.adobe.com/thread/1038992?start=32
    The name construction that I used there was just an "x" appended to the document name. Use whatever you like. Also juliew subsequently referred to the method as a "double-batch" run, although it is not. One run of the batch will output two JPEGs for each input document.
    I hope the disagreements in that thread don't cause too much disruption.
    If you want, the Batch command itself can be recorded in another Action which would store the parameters of the batch, then you could run that Action anytime without having to set up the details of the batch each time. It would always output to one specific folder, though.

  • Used Photoshop Image processor to batch convert from CR2 to Jpeg and the edits don't stick

    Ok, so I had a huge wedding where the bride paid me to deliver a ton of images.  Well, i did all my edits in ACR and then photoshop.  While in photoshop all the edits look to have been applied.  So, I use edit > Scripts>Image processor to convert the CR2 files to Jpeg in one fell Swoop.   Well, on my last run though (checking any images for missed edits or what not), none of of the edits were applied to the saved jpegs.  So I bring one up in Photoshop (the saved Jpeg) and the edits are applied in Photoshop.  So I click save and it tries to save as a PSD file (which it was not originally saved as).  I click to JPEG and it asks to replace the existing file and I do.  Voila, all the edits are a-pplied.  Now, I have about 200 images that I need to do this on. 
    Is this common with the image processor?  Is it not for converting processed Raw files to JPEG and keep the edits?
    I'm very frustrated since now, depending on my misunderstand of the tool, I have to spend extra time saving the files again.  (At least I don't have to re-edit them)

    I have action I wrote so that on large groups of pictures I hit my actions.  It goes through the whole set.  Then I hit my flatten and it goes through the whole set.  Then I go to scripts > image processor  and covert them to jpeg. 
    The weird thing is when I bring up the jpegs in photoshop, all the edits are there.  When I look through Photo Mechanic or upload them to the web, they aren't

Maybe you are looking for

  • Send Email Report with Publisher? and  Job Manager...

    Hi, i have a great Doubt, i try to send Email with a report, first i try to send with Publisher, this is all configurations. Delivery Configuration !http://lh3.ggpht.com/_V2lpPpulbm0/Slwm-4TLiJI/AAAAAAAACag/xZ5w57zkRnM/s800/BI%20Publisher.PNG! Email

  • How to write a composite element in iterator?

    Hi,   I want to write a composite element in iterator which has the same result as BSP element like this in BSP layout:   <htmlb:link id = "link1"               reference = "http://www.sap.com">   <htmlb:textView id = "text1"                   textCo

  • Sapinst import support package 19

    Hi, While I am doing import support package 19 though sapinst below error is occuring: ERROR 2007-06-15 03:34:44 MUT-03025  Caught ESAPinstException in Modulecall: ESAPinstException: error text undefined. ERROR 2007-06-15 03:34:44 MUT-02041  SDM call

  • [Solved]Catalyst14.1 and X server1.15, X crashed when playing video

    Last upgrade to catalyst 14.1-1 and xorg-server 1.15.0 When playing local video,the X server crashed.Nothing's wrong unless playing local video,Watching online video and ingame video ,as well as playing video in Vmware has nothing wrong.I've tried vl

  • [Essbase] - using TopCount MDX  function

    Hi, I would like to use the TopCount MDX function in an ASO cube. I did manage to write the MDX query but did not find how to "convert" it as a MDX formula on the "MEASURE" dimension (well I am guessing). I thank you for your help! Thomas MDX query :