Forcing CGImageProviderCopyData() to return RGB image without alpha channel

I am using CGDataProviderCreateWithData(), CGImageCreateWindoJPEGDataProvider() and CGImageProviderCopyData() to decode a JPEG image using core graphics. However the problem is that CGImageProviderCopyData() is returning RGBA instead of RGB, and I have to manually run across the entire bitmap contents and get rid of the alpha channel, which is time consuming.
Is there any way I can force CGImageProviderCopyData() to return a RGB image without the alpha channel? Or any other way to decode where I can skip the step of having to manually delete the alpha channel?
Thanks!

It would be great if you told us what program you are talking about. And it would be even better if you posted your question in the appropriate product forum, which you may find here:
http://forums.adobe.com/index.jspa?view=discussions
This forum is only for discussions on the forums themselves.

Similar Messages

  • Export PNG images with alpha channel from flash

    Hi,
    I have this FLA with animation and when played, the animation has alpha channel. I can’t understand why when I look in the library I see the frames without the alpha channel and also when I try to export/extract the image again the image don’t have alpha channel.
    How is it that in flash this image has alpha channel and how to get it out like that into PNG?
    Here is the link to download the FLA:
    http://download759.mediafire.com/nb749r29220g/e0636ab0ru6ouoa/Untitled-1.fla

    "when played, the animation has alpha channel"
    how are you playing the animation? control/enter in Flash, Publishing to a Web page or what?
    How can you tell that the animation has the alpha channel? What exactly are you seeing?
    What is the aniimation? a series of images, one image moving? Are teweens imvolved?
    " when I try to export/extract the image again the image don’t have alpha channel"
    How are you exporting the image? is it a single image? or a series of frames that makes up an animation?
    What was the file format of the original image? you brought that image into Flash and animated it? Now you want to export as a .png with transparency?
    Have you ever tried to export a  simple .png before so that you see and understand the dialog box that pops up during export? are you chosing "24 bit with alpha channel" in the "Colors" choice?
    For those of us who may not want to download your file, please provide a more detailed describtion of everything related to this question.
    Best wishes,
    Adninjastrator

  • JSFL SpriteSheetExporter exports png's without alpha channel.

    Hi,
    When I generate spritesheets using the JSFL SpriteSheetExporter it seems the generated png's always come with a solid background. I have found no information in the documentation on how to control this (e.i make the background transparent).
    SpriteSheetExporter.format returns  "RGBA8888", so the image appearenly has an alpha channel.
    Grateful for any information or ideas to help resolve this issue.
    Cheers!

    Esdebon,
    Thanks for the reply.
    No, the movieclip has a transparent background.
    Note that this question concerns the JSFL SpriteSheetExporter (scripting). The tutorial you refer to seem to cover the sheet exporter in the Flash IDE.

  • Graphics, ImageIO, and 32-bit PNG images with alpha-channels

    I have a series of 32-bit PNG images, all with alpha channels. I'm using ImageIO.read(File) : BufferedImage to read the PNG image into memory.
    When I call graphics.drawImage( image, 0, 0, null ); I see the image drawn, however all semi-transparent pixels have a black background, only 100% transparent pixels in the source image are transparent in the drawn image.
    The Graphics2D instance I'm drawing to is obtained from a BufferStrategy instance (I'm painting onto an AWT Canvas).
    Here's my code:
    Loading the image:
    public static BufferedImage getEntityImage(String nom, String state) {
              if( _entityImages.containsKey(nom) ) return _entityImages.get( nom );
              String path = "Entities\\" + nom + "_" + state + ".png";
              try {
                   BufferedImage image = read( path );
                   if( image != null ) _entityImages.put( nom, image );
                   return image;
              } catch(IOException iex) {
                   iex.printStackTrace();
                   return null;
         private static BufferedImage read(String fileName) throws IOException {
              fileName = Program.contentPath + fileName;
              File file = new File( fileName );
              if( !file.exists() ) return null;
              return ImageIO.read( new File( fileName ) );
         }Using the image:
    Graphics2D g = (Graphics2D)_bs.getDrawGraphics();
    g.setRenderingHint( RenderingHints.KEY_ANTIALIASING , RenderingHints.VALUE_ANTIALIAS_ON);
    public @Override void render(RenderContext r) {
              Point p = r.v.translateWorldPointToViewportPoint( getLoc() );
              int rad = getRadius();
              int x = (int) p.x - (rad / 2);
              int y = (int) p.y - (rad / 2);
              BufferedImage image = Images.getEntityImage( getCls(), "F" );
              r.g.drawImage( image, x, y, null );
         }

    You may want to check on you system and see what ImageReaders are available, it could be ImageIO is just not picking the best one, if not, then you can use getImageReaders to get an iterator of image readers, then choose the more appropriate one.

  • Export for DVD with Animation codec without alphas channels not working?

    I'm using FCP 5 with DVDSP. My FCP projects consist of quicktime movies that are using the Animation compressor (for lossless quality), and the movies contain alpha channels (thus they were rendered at Millions + colors to preserve the alphas).
    This is my problem. I want to now export a quicktime movie to use in DVDSP with animation compression, so it is again lossless quality (obviously to presever the quality through these steps). But I do NOT want to preserve the alpha channels, because what I've learned is that when made into a DVD, the alphas are not preserved and the image looks wrong (as if without the alphas).
    So I basically want to "flatten" the video, if there was some way.
    I would assume the solution would be to, in FCP, export a quicktime at animation compression, but set to Millions for colors, and not Millions + (I was taught that the Millions + will preserve the alpha info).
    Well, what's happening is when I set it to that, it renders, but then I get info on the movie in Quicktime and it says it has Millions + still. And thus, it looks wrong in DVDSP.
    What is going on? Is this a bug in FCP?
    Does anyone have an idea as to how to get around this. The only thing that has worked for me is to export the Quicktime movie with "none" for compression, but that's making the movie SO large that I can't work with it and it doesn't play right when I make the DVD.
    I really appreciate anyones help on the matter. Thanks!
    Brian,.
    Quad-core 2.5 G5   Mac OS X (10.4.6)   30" Apple Cinema Display
    Quad-core 2.5 G5   Mac OS X (10.4.3)   30" Apple Cinema Display

    Thanks for the suggestions. I have not yet tried laying a solid black video track underneath to see what it does, but it seems like a good idea and I'll try it out to see what happens when I get back home.
    I'll try to explain what I mean by the image looking wrong.
    I'm picking up where another left off, so I'm not sure of how he cut the quicktime movie together; all I know is that they used alpha channels in Photoshop and After Effects to make the image looks the way they want it. This is a drawn character laid on a white background with a black frame around the entire image. It looks the way he wants it to in the quicktime movie, and this quicktime movie is 720x480, animation millions colors +, 24fps.
    This movie, along with others of the like, need to be cut together in FCP and then put on a DVD with DVDSP. When I export it and it looks "wrong", what's happening is there is a black block behind the drawn character. The guy that made the movies in AE says that, that is what it looks like when the alpha channel is not working correctly.
    To test things, I've changed the quicktime compression settings in the sequence settings. If I set it to anything that is not animation, I get that black block in the viewer. (Note though, that if I set it to animation, millions + or not +, it shows the alpha correctly both ways).
    In FCP's user manual it says that if you're passing your movie on to a DVD, to use a high or lossless compression to keep the quality up, like animation or PhotoJPEG. For this reason, I haven't wanted to go to DV - especially with this type of image (graphic drawn shapes), it's easy to see a quality difference.
    It really seems like there is a lot of voodoo involved with compression settings. As for now the best "fool-proof" solution I've found is to re-render the movie in After Effects at millions (not+) so that it won't contain the alpha channel info, and FCP seems to like that a lot more.
    I just wish I could get FCP to work with the movies as they were because I'm having to re-edit everything to work with these new movies now.
    Thanks again for the tips and insight.
    Quad-core 2.5 G5 Mac OS X (10.4.3) 30" Apple Cinema Display
    Quad-core 2.5 G5   Mac OS X (10.4.3)   30" Apple Cinema Display

  • Text-wrap line art without alpha channel or path

    I have seen a tutorial that uses TIFF format images (B&W line art) around which text-wrap is applied.
    Do all TIFF images have this property, or just those that have been given the right treatment?
    Do any other graphic formats offer this property?
    Anyone knows of a tutorial that thoroughly covers graphic formats, the inherent and acquired properties?

    It's not an image property, and you can apply text wrap to any object in ID, either to the bounding box or the object shape, or to a custom shape that you modify with the pen tool

  • Moving images with alpha

    In Pages '09, images with alpha channels can be difficult to deal with, especially if the alpha is a bigger part of the object than the non-alpha portion.  The issue is that you cannot move an object by clicking on an area that is transparent.  For most images, this is intuitive and helpful, but for some things it is infuriating.  For example, when pasting in a PDF or image object of a MathType equation, it is quite difficult to reposition the image quickly, because great care must be taken to click on a letter in order to drag the object.  To make matters worse, the edge detection of the non-alpha portions of the object is not extremely precise, so it can appear that you are clicking on a legal part of the image, but you will get no response from pages.
    My question is this: do any of you know if there is a preference somewhere that controls whether alpha is selectable or not?  I would just like to be able to click anywhere in the image box and move the image.  It doesn't matter if it is a support preference or requires fiddling with a plist somewhere.  Anything would be helpful.  Thanks.

    Dream on,
    Well, the World needs more Yoyo Ma types, so I hope you are successful.
    If you Command-Click in the Margin and Drag across the page, you will catch the object in a wide net. Then you can manipulate it with the arrow keys, or Shift-Arrow for larger moves.
    Jerry

  • 'greyscale' RGB image, need to convert to specific CMYK black...  how?

    Hi,
    I have an image provided in RGB, but visually it's greyscale, except for some red areas on certain clothing. I need to convert it to CMYK, and I want all the black areas to be 40/30/20/100, and the grey values should be percentages of this mix. The red should be visually unaltered. Im using CS3 btw.
    Is there a way to quickly do this? I can convert to a generic CMYK value then tweak the curves of each channel, but it will affect the red. I could make a selection to exclude the red, but i feel there must be a way for me to define my black, and convert, and for my wishes to be granted automagically.
    I tried redefining my default black in the foreground/background swatches, but that had no effect on the subsequent conversion.
    Also, I'm trying to avoid profiles as my brain is foggy in that area...
    Thank you,
    Simon Gregory

    Without seeing the image, it might be a shot in the dark, but what about creating a new CYMK document, of the same size as the RGB one. Add a layer filled with the 40/30/20/100 black.
    Go to the RGB image, In the Channels panel, drag the red channel to the new channel icon. Drag this new channel to the CYMK channel panel. Add a layer mask to the 40/30... layer. go back to the channels panel, and target only the copied channel, copy it, target the layer mask channel, paste. Target the Layer mask, invert it.
    Now, select and bring the red part from the RGB image, and you should be good to go...

  • ImageIO PNG Writing Slow With Alpha Channel

    I'm writing a project that generates images with alpha channels, which I want to save in PNG format. Currently I'm using javax.ImageIO to do this, using statements such as:
    ImageIO.write(image, "png", file);
    I'm using JDK 1.5.0_06, on Windows XP.
    The problem is that writing PNG files is very slow. It can take 9 or 10 seconds to write a 640x512 pixel image, ending up at around 300kb! I have read endless documentation and forum threads today, some of which detail similar problems. This would be an example:
    [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304|http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6215304]
    This surely must be resolvable, but after much searching I've yet to find a solution. If it makes any difference, I ONLY want to write png image, and ONLY with an alpha channel (not ever without), in case there are optimisations that that makes possible.
    If anyone can tell me how to address this problem, I'd be very grateful.
    Many thanks, Robert Redwood.

    This isn't a solution, but rather a refinement of the issue.
    Some of the sources I was reading were implying that the long save time might be due to a CPU heavy conversion process that had to take place before the BufferedImage could be saved. I decided to investigate:
    I loaded back in one of the (slowly) saved PNG images using ImageIO.read(file). Sure enough, the BufferedImage returned differed from the BufferedImage I had created. The biggest difference was the color model, which was DirectColorModel on the image I was generating, and was ComponentColorModel on the image I was loading back in.
    So I decided to manually convert the image to be the same as how it seemed to end up anyway. I wrote the following code:
          * Takes a BufferedImage object, and if the color model is DirectColorModel,
          * converts it to be a ComponentColorModel suitable for fast PNG writing. If
          * the color model is any other color model than DirectColorModel, a
          * reference to the original image is simply returned.
          * @param source The source image.
          * @return The converted image.
         public static BufferedImage convertColorModelPNG(BufferedImage source)
              if (!(source.getColorModel() instanceof DirectColorModel))
                   return source;
              ICC_Profile newProfile = ICC_Profile.getInstance(ColorSpace.CS_sRGB);
              ICC_ColorSpace newSpace = new ICC_ColorSpace(newProfile);
              ComponentColorModel newModel = new ComponentColorModel(newSpace, true, false, ComponentColorModel.TRANSLUCENT, DataBuffer.TYPE_BYTE);
              PixelInterleavedSampleModel newSampleModel = new PixelInterleavedSampleModel(DataBuffer.TYPE_BYTE, source.getWidth(), source.getHeight(), 4, source.getWidth() * 4, new int[] { 0, 1, 2, 3 });
              DataBufferByte newDataBuffer = new DataBufferByte(source.getWidth() * source.getHeight() * 4);
              ByteInterleavedRaster newRaster = new ByteInterleavedRaster(newSampleModel, newDataBuffer, new Point(0, 0));
              BufferedImage dest = new BufferedImage(newModel, newRaster, false, new Hashtable());
              int[] srcData = ((DataBufferInt)source.getRaster().getDataBuffer()).getData();
              byte[] destData = newDataBuffer.getData();
              int j = 0;
              byte argb = 0;
              for (int i = 0; i < srcData.length; i++)
                   j = i * 4;
                   argb = (byte)(srcData[i] >> 24);
                   destData[j] = argb;
                   destData[j + 1] = 0;
                   destData[j + 2] = 0;
                   destData[j + 3] = 0;
              //Graphics2D g2 = dest.createGraphics();
              //g2.drawImage(source, 0, 0, null);
              //g2.dispose();
              return dest;
         }My apologies if that doesn't display correctly in the post.
    Basically, I create a BufferedImage the hard way, matching all the parameters of the image I get when I load in a PNG with alpha channel.
    The last bit, (for simplicity), just makes sure I copy over the alpha channel of old image to the new image, and assumes the color was black. This doesn't make any real speed difference.
    Now that runs lightning quick, but interestingly, see the bit I've commented out? The alternative to setting the ARGB values was to just draw the old image onto the new image. For a 640x512 image, this command (drawImage) took a whopping 36 SECONDS to complete! This may hint that the problem is to do with conversion.
    Anyhow, I got rather excited. The conversion went quickly. Here's the rub though, the image took 9 seconds to save using ImageIO.write, just the same as if I had never converted it. :(
    SOOOOOOOOOOOO... Why have I told you all this?
    Well, I guess I think it narrows dow the problem, but eliminates some solutions (to save people suggesting them).
    Bottom line, I still need to know why saving PNGs using ImageIO is so slow. Is there any other way to fix this, short of writing my own PNG writer, and indeed would THAT fix the issue?
    For the record, I have a piece of C code that does this in well under a second, so it can't JUST be a case of 'too much number-crunching'.
    I really would appreciate any help you can give on this. It's very frustrating.
    Thanks again. Robert Redwood.

  • How can I dispaly alpha Channels to proxy and show transparency correctly?

    Hi all! I have a problem. Please help me. Thank you very much.
    I want to display alpha Channels to proxy and show transparency correctly. I have get the datas of alpha Channels and RGB color. Following are the codes:
    void HiddenData::PaintPreview()
    if( !channelData ) return;
    PSPixelMap pixels;
    int spotChannelCount = gFilterRecord->documentInfo->alphaChannelCount;
    pixels.version       = ( spotChannelCount > 0 ) ? 2 : 1;
    pixels.bounds.left   = proxyRect.left;
    pixels.bounds.right  = proxyRect.right;
    pixels.bounds.top    = proxyRect.top;
    pixels.bounds.bottom = proxyRect.bottom;
    int32 proxyWidth  = proxyRect.right - proxyRect.left;
    int32 proxyHeight = proxyRect.bottom - proxyRect.top;
    pixels.imageMode     = gFilterRecord->documentInfo->imageMode;
    pixels.rowBytes      = proxyWidth * gFilterRecord->documentInfo->depth / 8;
    pixels.colBytes   = 1;
    pixels.planeBytes    = proxyWidth * proxyHeight;
    pixels.baseAddr   = channelData;
    // new for version 2 of PSPixelMap
    PSPixelOverlay* overlay = NULL;
    if( spotChannelCount > 0 ){
      overlay = new PSPixelOverlay[ spotChannelCount ];
      if( overlay ){
       int j = 0;
       for( int i = 0; i < spotChannelCount; i++ ){
        overlay[i].data = channelData + pixels.planeBytes * (4 + i);
        overlay[i].rowBytes = pixels.rowBytes;
        overlay[i].colBytes = 1;
        overlay[i].r = (unsigned8)spotColorList[j++];
        overlay[i].g = (unsigned8)spotColorList[j++];
        overlay[i].b = (unsigned8)spotColorList[j++];
        overlay[i].opacity = 50 * 2.55;
        overlay[i].overlayAlgorithm = kStandardAlphaOverlay;
        overlay[i].next = ( i == (spotChannelCount - 1)) ? NULL : overlay + i + 1;
       pixels.pixelOverlays = overlay;
       pixels.colorManagementOptions = kViewAsStandardRGB/*kViewAsMask*/;
    pixels.mat = NULL;
    pixels.masks = NULL;
    pixels.maskPhaseRow = 0;
    pixels.maskPhaseCol = 0;
    (gFilterRecord->displayPixels)(&pixels, &pixels.bounds, 0, 0, (void *)hdc);
    delete[] overlay;
    But there is a problem.The image of alpha Channels in proxy is not clear, because overlay[i].opacity = 50 * 2.55.
    It looks like  diffrent from displaying in photoshop.I do not know how to use pixels.mat and pixels.masks.
    Thanks!

    I run the plugin. But It can not show alpha channels. Can you show the code in your example clearly.Thanks! Following are the frames.
    The original document:                                 
    The result:
    Can not show the alpha channels.

  • LR import with alpha channel

    <Lightroom novice> Can I import a tif image with a alpha channel in it? It seems as though LR will accept the image and allow development but when I export it as tif or psd it goes out as RGB only - the alpha channel is gone. I don't really "need" to do anything with this channel in LR but I can't have it disappear either. Maybe a import/export setting issue - I hope so...

    TLL... wrote:
    "All file "edits" are kept in LR's catalog, which should be backed up along with the unmodified "original" files."
    OK, got that too. We probably won't save this once the exported images are approved and backed up.
    It sounds like you don't need LR's database tools for organizing, adding metadata, or the various Export modules. You could still use LR to expedite Development editing of the RGB image. One possible solution is to Export the LR edited RGB images full size to a separate folder with the same bit depth and colorspace as the original files. Then use a PS Script to Batch Merge the LR export image to a new layer in the original file, something similar to this one:
    http://forums.adobe.com/thread/546727
    This way you still have the original RGB image backed up as a layer, which can also be unselected in the merge script.
    TLL... wrote:
    "At a later date the Alpha Channel information can be applied "non-destructively" in PS using editing layers to "blend" the IR image data."
    This is where I'm getting lost. Are you talking about stripping the 'original' alpha channel from the pre-LR image and inserting it into the LR processed RGB image via PS batch/script? That's my thinking as an one approach.
    "These PS modified files can be re-opened in LR and will now show the applied Alpha channel editing layers. Make any further edits you desire in LR and use the most appropriate LR module to "tailor" the output for your specific usage."
    No they won't, or do these steps involve only psd files w/alpha channels? The alpha channel (IR data) is still ignored by LR, I have no way to even just keep that information once inside LR nor can I "taylor" a way to save an image with 4 channels of color information inside LR.
    I have no idea what you will be doing with the Alpha channel IR image data, but I was suggesting to convert the Alpha channel to a layer mask in PS with 'Blending.' This leaves the Alpha channel as a backup of the IR data. Here's a simulated example using a an IR layer mask I created using LR's B&W IR Develop preset:
    You can use PS actions with the Batch processor and/or build scripts to do just about anything. In LR you can create Develop presets to apply adjustments across 1,000s of images with a couple of mouse clicks, but no Actions or scripting capability. Like I said, PS & LR are complimentary, but different. I'm not sure which processing methodology is best for your image "end-use" but I hope this gives you some more ideas.

  • Issue (aka bug):  File compatibility and alpha channels

    When I enable file compatibility mode on photoshop (so that previews and thumbnails show up), the thumbnail and preview will be wrong when there's an alpha channel in the channel palette. Specifically, the thumbnail will be masked by the top-most alpha channel in the channel palette. Consequently, there is sort of a work-around--if you create a plain white alpha channel and make sure it's the top-most alpha channel in the palette, then the preview and thumbnail come out fine. Luckily, this requires negligible extra memory.
    If there's no alpha channel or I don't save alpha channels, the preview/thumbnail looks fine.
    In spite of the work-around, a fix would be nice. It'd also be nice if there was a way to have a preview/thumbnails in Finder without the large memory penalty of compatibility mode.
    Bart

    Yes, everything in Bridge works great. However, the search function in Bridge is SLOW and a bit flaky (same problem on the Windows side as well) so I like to use spotlight instead for searching. Additionally, I like to use iPhoto to create collections of images that will contain photoshop files as well as others.
    For now, it is workable for me to just use compatibility mode in photoshop and make sure all images with alpha channels have an all-white alpha channel at the top of the stack. The file size penalty is tolerable for now. If Apple ever fixes things on their end, then it's a simple script to convert my psd files back again.
    Bart

  • Thumbnail/Preview Alpha Channels

    Hi there,
    I'd like to be able to script/set the Bridge to browse images by Alpha Channel rather than RGB (I have lots of images with similar RGB but unique Alphas).
    Does anyone know if this would be possible or where to start?
    Thanks in advance for any help.
    Karl

    Hi Andrew,
    Thanks for your suggestion; however in the situation I'm working in it's important that the images themselves are not changed, I just want to be able to switch the 'view' to Alpha mode.
    Karl

  • How do I prevent the image from shearing when I have an alpha channel?

    I'm using After Effects to prepare some videos for the web.  They are running at 320x240.  The settings are Flv/F4v, Millions of colors, 15 FPS, RGB and Alpha, 44K/16bit Mpeg III audio, CBR 1 pass with a bit rate of 872, On2VP6 encoding.
    I create the alpha channel from a greenscreen behind the actor using standard keylight and garbage mattes.
    When I do not encode an alpha channel, the image is fine.  My problem is that when I try to encode the alpha channel, the image shears to the left from bottom to top, and the whole image is transposed about 40% to the left.  But we need the alpha channel.
    This is what the shearing looks like.  Any ideas on what is happening and how to prevent it?  Thank you.

    To check the clip, I made a small swf file the same dimensions and frame rate, 320x240 @15fps.  It's a single frame, single layer with no skin.  It just plays the flv file when you open up the swf.  The flv file is external, so to test the results, I just keep rendering in AE to the same flv file name.
    The first two seconds play okay.  The shearing doesn't begin till after that.  So I'm suspecting there is something strange with the keyframes.  I even tried messing with the keyframe distance settings at 30 and 15, without effect.
    The original video is an 854x480 mov file playing at 14.99 fps, millions of colors, Sorenson 3 coding.  When I bring it into the comp, which is set at 320x240 @15 fps, I scale the movie to 50% in size.  At your suggestion, I just tried making sure that all the frame rates are 14.99 instead of 15.  Sadly, without any benefit.  I'm still baffled.

  • How to load an image without a gui? big problems...

    Hey guys, I usually try my best to not ask for help and figure stuff out myself. But this last week i've been having big problems with this work project.
    My goal is to load images from disk, and append them to each other to create one big image.
    The images are 0-9.jpg each file containing a number in it. then i create one big file with 4 numbers in it. called final.jpg.
    so far i can do all this, but whenever the program is finished, the application just keeps running. the program has literally gone through all the steps... i have a system.out.println printed on the last line after the main, after the class instantiation... and still it stays running.
    how do you guys load images without a gui? This program will probably be running under unix, so i can't create a (for component example)
    Panel() and media track the file load... so i'm pretty much stumped
    any help you guys can provide would be really incredibly helpfull at this point. I have searched these threads for a few hours without luck. I found only 1 real post related to my problem, but eventually they said use MediaTracker = new Mediatracker( new Panel() ); which i can't use. :(
    Thanks a lot guys.
    :D

    yeah tried doing that, didn't work either.
    UPDATE
    I FINALLY found a way...
    and here it is for others to find!
    public BufferedImage getImage(String filename) throws Exception {
    FileInputStream input = new FileInputStream( filename );
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder( input );
    BufferedImage image = decoder.decodeAsBufferedImage();
    return image;
    it returns an image buffer, but it's better than nothing! :)
    atleast this functions under unix.

Maybe you are looking for

  • Can I find out WHY FIOS is not availble in Smyrna, DE

    Yeah, yeah, yeah; I know the official words from Verizon - "Service is unavailable in my area, we are continously expanding...." We've had fiber on the poles for several YEARS now here in Smyrna (it was run down my street when they expanded the road

  • Resize to specific pixel size??

    I have photographs that need to be resized to 676 x 138 pixels exactly. I have tried just resizing them as normal but they go out of focus. I have also tried cropping them first, and then resizing, but I end up with white space down each side. Can an

  • Code Problem!  Please Help!

    Hello Everyone, I have a problem with a code that I have been working on for days. I keep getting this error message: exception in thread main java.lang.ArrayIndexOutOfBoundsException I would really appreciate your help. I am a beginner java programm

  • Could i upgrade my mac os 10.7.5 to os 10.10.

    I am trying to upgrade my macBook os 10.7.5 to higher os

  • DynDNS or No-IP service with Server?

    I just received my Mac mini Snow Leopard Server and I am contemplating also being able to access the server from outside the house as well as from inside. If I use No-IP or DynDNS service, will this work? Or should I purchase a static IP address from