Strange Image when Saving

Hi.
I make my image
image1.getGraphics().drawImage(top, 50, 100, null);
image1.getGraphics().drawImage(right, 250,100, null);
image1.getGraphics().drawImage(front, 50,200,200,200, null);
myPannel.setImage(elaboraImmagini());
myPannel.repaint();I see the image perfect in my pannell but when i Save i have a different image colour!!!
Why!!!
Strange colour
whyte ----> Pink
black -----> blue
i save with this code
ImageIO.write(image1,ext,f);Why I see normal and save strange??
Please help!

My guess is that your issues lies with transparency. Depending on what type of image "image1" is, it may or may not support transparency. PNG supports a full alpha channel, but JPG does not support transparency at all. So if drawing a transparent image onto a medium that does not support it, you'll find your background become whatever the original pixels would read assuming opaque alpha values.
That was just to let you know why you're seeing this. The simple solution is to preceed your image draws with a fillRect of the desired background color. So if you want a black background:
Graphics imageG = image1.getGraphics();
imageG.setColor(Color.BLACK);
imageG.fillRect(0, 0, image1Width, image1Height);
imageG.drawImage(top, 50, 100, null);
imageG.drawImage(right, 250,100, null);
imageG.drawImage(front, 50,200,200,200, null);This ensures all pixels of your image are opaque and thus can be saved onto mediums which do not support transparency such as JPG.

Similar Messages

  • Need help with info about the possibility of altering images when saved in a different format

    I am very new to the design world.  I have a printing business and received and image to be printed in Adobe Acrobat (I think).  I needed to resize the image to be printed and took it into Photoshop CS6 where I cropped the edges.  I then resave it as a PDF and took into a printer software, Fiery.  Fiery has an Impose function where you can repeat an image to layout it on the correct paper size.  It essentially just copies the original image several times depending on the layout.  This particular image I repeated to 3 up and 1 across.  When printed it came out with a magenta streak through the center image only.  I have had the machine checked and they are adamant it's not a printer issue but a software issue.  That once I altered the original image by resizing it that I altered the image and that I can't expect it to come out as seen on the screen.  I've printed it all sorts of different ways and it only occurs with the 3 up 1 across image.  I know that images can be changed when saved from program to program but this situation does not make sense that it is only the one area and layout that this shows up. I would appreciate any help, input, answers that anyone has.  Again, I'm new to this and would like to understand if this is a potential for further printing jobs so that I can do what I need to avoid this situation. 
    Thank you for your time.
    Jessica

    Jessica,
    Without knowing how the original graphic was created it is hard to tell you how to handle it. What is the name of the file? (Only the file suffix is important). If the file's origin was in a drawing program and/Or InDesign, then the document should be handled differently if the document is a raster image best handled by a program like Photoshop.

  • "Insufficient data for an image" when saving a file

    I'm running Acrobat 9.5.0 on a Macbook Pro running OS X 10.6.8.
    After scanning a document from my Canon MX882, or opening and editing an existing pdf I get the following error when I try to save the file:
    Insufficient data for an image
    When I try to save the file again, I get this:
    The document could not be saved. There was a problem reading this document (109).
    Sometimes the error also has (8) instead of (109).
    When this occurs, the thumbnail of the page appears correct in the left pane; however, the content of the page itself is entirely or partially missing.
    Any suggestions would be appreciated.
    -c

    I am also having this problem, especially with scanned documents. Since I need to download scanned documents in my work this is a big problem!Sometimes I can read but not save the document, sometimes one or two of the pages will be blank from the start. I have the latest version of Adobe Reader XI (11.0.10). I tried reducing the page zoom, a suggested workaround on this page: Acrobat: “Insufficient data for an image” error after updating to 10.1.4 or 9.5.2,  but that did not help at all. FWIW I use a Windows 8.1 PC with 4 GB RAM. I usually download PDFs from the internet using Firefox.

  • Pixelated Image when Saving as .pdf

    I've been searching the forums looking for a solution to this problem, but I just can't seem to figure it out. Thank you for helping me out.
    I'm making an 8.5 x 11 inch document and I would like to save it as a .pdf. The text looks great and comes out incredibly clear. One of the images that I have placed within the document comes out looking terribly pixelated. I know I probably need to alter the dpi or such, but I need some instruction on how. I have no compression in place when saving as a .pdf and have picked the highest quality option.
    The document also displays the picture as pixelated when I save in .png form.
    The image that I am placing in the document is in .png form. It seems quite large and has to be sized down to fit appropriately in the document.
    How can I alter things so that the image also looks clear?
    Any advice that you have would be greatly appreciated.
    Thanks,
    Nicole

    Hi Nicole,
    Continuing from Trevor a bit, if you can possibly get the original artword file, that would be best. Unfortunately my experience with Illustrator tracing is "it depends." Where it does the potentially lower quality is the tracing of logos, although the more detailed, the better the results might be. In things like arcs or leaves, AI is trying to follow the line, but if the line is anti-aliased, it doesn't really know where that line is and what it guesses at isn't always what we'd like.
    Albeit detailed, it sometimes is best to replicate it in AI (of course you'd charge them for this) and that will give you complete control on how it's going to look.
    [Note: as an Illustrator practice technique, I look for coloring book artwork and try to replicate it in AI. I take the image (scan it if necessary), and place it in a layer in AI and lock the layer. Then I trace over that image in AI trying to replicate the line-art as best I can. I've found it's a great way to develope techniques and solve problems. Even if you never use these images, it's a great practice mechanism to develop your abilities and force you to find solutions within AI that you might have not thought to look up.]
    However, as Trevor states, if all you have is the JPEG, saving it back to PS is too late. The damage is done. And Acrobat can only put out based on what it got in.
    Good luck.

  • IPhoto iPhone app... degrading image when saved?

    Having the iPhone 4 and iPhone 4S and using the camera app that apple includes degrades the resolution size when after you take a picture THEN use EDIT and apply auto correct.
    When you save the image the fine becomes NOT full resolution for some reason?
    When shot using the "iPhone 4" for starters the shot image and saved is 1936x2592 px (5MP)
    If you EDIT the picture after shooting it using the Apple supplied app and save the image the size NOW becomes 1529x2048 px (3MP)
    I have purchased iPhoto app and in using it find the same loss in resolution when editing a image and saving it, you get the same loss in size and resolution in your camera roll when you check size.
    WHAT is going on here Apple?
    I have MANY iPhotography apps and have NEVER seen that happen UNLESS they are free or what ever so from what I can tell Apple takes the image at FULL resolution, but when you EDIT the image using THERE camera app or now the just released iPhoto app ($4.99) you end up with NON full resolution images.
    ANYONE have a explanation of why and how to get a full resolution shot to stay that way if edited with Apple camera app or iPhoto app, were is the menu to turn that off?
    When having Location Services on... Saving from the Photo app, after using the edit buttion DOES save the image at full resolution but in iPhoto app is DOES not and always see the degrade of the image to 1529x2048 px (3MP) every time... What is going on here and can be confirmed after many times testing this.
    Maybe NOT using those products might be the way to go. The iPhoto app is generic at best anyways so it's no loss in what it does and WAITING to see a full review here soon hopefully.
    Looking for your comments.
    Thanks.

    Yeah my point is though... Its like a console. I have a game that I have played on my console 3 years ago. I have a saved game half way through and now I want to continue that game... Unfortunately because i turned the game off despite saving it - it hasn't actually saved?
    Surely when itunes syncs your game data across it should sync the current saved game that you have with it?
    If thats not the case and Apple expect you to restart a game everytime you take it off your phone and put it back on it surely your to expect people to get annoyed with it? surely im not the only person that has noticed and become annoyed with it.

  • One page displays as negative image when saving PDF to reduced size in Preview

    Imac Intel Mid 2007
    OS X 10.5.8
    Preview v4.2
    I have a multi-page PDF I'm trying to save to a reduced size.
    The document was constructed of separate pages, some of which were created as Photoshop PDFs in Photoshop CS4 and others were saved as PDF's from Word.  After moving over the individual PDF's to the side bar, the document saves fine in Preview at full size. When I use the quartz filter to "Save As"  "Reduced File Size" one page saves as a negative image and the others are all fine.
    One suggestion I saw in a similar thread was that the mode in PS might be CMYK, however it is not and it is RGB.
    Any help as to solving this would be greatly appreciated.

    n.gilbert wrote:
    If I select all pages 'save as' will only save out one page and not all.
    JPEG is single-page.
    If I print and choose 'pdf to jpeg'
    Elaborate, please.
    Is there a way to save to pages out in one go to jpeg where I can adjust the dpi setting?
    Yes. Build an Automator workflow using the PDFs > Render PDF Pages as Images action.
    Once I have the reduced jpegs it's easy enough to reimport into preview and save as a pdf.
    If the desired final output is multi-page PDF, no need to go through all that. You can do the task in Acrobat Pro (PDF Optimizer), or in Preview (Save as > PDF > Quartz Filter). If the current Reduce File Size filter doesn't provide satisfactory quality, use ColorSync Utility to duplicate it (or make a new filter from scratch) and adjust it to fit your needs.

  • Is there anyway to stop PS Touch automatically resizing the file/image when saving to Gallery

    I bought the Note primarily for the PS touch feature as a way of editting my photos on the move and not being tied to my PC at home. Now i load up my images from the MicroSD card and edit away but when i save them i only have the option of saving to Gallery and not the memory card (not a major problem itself). However they are automatically reduced in both file size but also image size, which is fine for small prints but i like having the option of printing larger so would prefer to keep the large file size if possible.
    On a similar note is it possible to save direct back to the memory card overwritting the original or is it always going to go to the gallery?

    The only thing you can to it to set the  import size to the max value within the PS Touch Settings-> Image Import
    When your image is even larger than the MAX value, PS Touch downscales the image.
    Hope that answers your question.
    Guido

  • Blurry Images When Saved In Illustrator CC

    Hi,
    I've been trying to figure this out for weeks, but can't figure it out. I'm trying to create a new logo and now that I've created it, I try to save it and once saved, It looks very blurry/fuzzy. But in illustrator it looks excellent! It's just in the saved copy that looks horrible. I'm new to using Illustrator, and still in the process of learning, I know it's probably something simple to my problem however I've read every forum related on the internet and even on here and all the solutions that have helped others don't work for me... I'm just metally drained and don't know to do, Any help to solve this problem would be helpful.
    -Illustrator CC
    -Macbook Pro Retina -late 2013
    If there's anything else that you would like to know please let me know. I've tried every possible format just about for the logo to be saved as. Even in the browser preview mode in save for web, it looks horrible. I'm needing this logo to be saved as jpeg, png, or something relative.
    Thanks in advance!
    -Michael

    It isn't really something that requires a 'fix' as such - sadly the number of people with Retina displays is still quite small and most of the time devices use some clever upsampling jiggery-pokery that makes the graphics look better.
    I have another question for you, now - when you are exporting your image file from Illustrator, are you changing the anti-aliasing settings to Art Optimised? If this is all news to you, are you using the Export for Microsoft Office option? Or Save For Web?
    Sorry to have to ask but it helps in helping you.

  • Missing images when saving an illustrator file in pdf format

    It just happens with some of my files. Somehow, there are layouts that have the images properly linked, are seen on screen as they have to and so on but when I save them as pdf or try to print them suddenly some of the pictures are missing.
    Does anybody have the same problem? I've tried to solve it saving the document as different formats but the problem persists.
    Thanks a lot!

    We all have Acrobat Professional reader 7.0.
    I guess he has Windows but tried to open the file from his ipad too.

  • How to set the resolution of images when saving Book as HTML

    How can I set a different resolution for images converted to *.GIF when I save a book as HTML? Why doesn't the conversion to JPG work?

    Hi
    I am running a stand-alone version of Framemaket 10.I try to convert a documentation with a lot of screenshots in it. Regardless of the settings on the Reference pages of the first document of the book, Framemaker converts all graphic files to *.gif, and these are downsized so much that they become illegible. I would like to have them converted to JPG, with little resolution loss, so they are still readable.
    I think Robohelp is too expensive…
    Best regards
    REIDEN TECHNIK AG
    Alexander Keller
    Tech Writer

  • Photoshop over-saturating images when saving for web

    I've spent most of the day recalibrating my monitor.
    I now use a gamma setting of 2.2, and target white point of D65.
    My color workspace is sRGB IE661966-2.1.
    I'm using Photoshop CS3.
    So I've tried converting an image (even though I am already working in the same color workspace) to sRGB IE661966-2.1 and when I do a Save-for-web, Adobe gives me an over-saturated image.
    Now, while in Photoshop I move the save-for-web window lower so I can visually compare the image in photoshop to the one presented in the save-for-web dialog, and they are still different.
    I am at loss.
    I could understand if I went to another computer and viewed the image, or went to another browser and viewed the image, but even in Photoshop, I'm seeing oversaturation.
    To compensate, I've been desaturating my images, but this is frustrating, as I feel it should work.
    Can anyone shed some light on this matter?
    I'm running OS X v. 10.4.11
    a dual processor Intel dual-core 2.66GHZ zeon
    2 GB RAM
    Monitor is a Dell 2407WFPHC

    >> I wouldn't want the other apps to assume sRGB for an untagged image, because
    That's a fair opinion...[I] would want an option to set an RGB Default profile in ColorSync, though, because the 'high-gamut' monitor I had here whacked out Finder, Preview, iPhoto color, and that setting would 'fix' the problem across the Mac OS.
    The last time I saw this ColorSync RGB Default option was in 10.3x
    http://www.gballard.net/psd/cswfi/panthercs.jpg
    But according to Apple's John Gnaegy, when I asked him WHY that setting wasn't working here:
    He said, "The ColorSync panel> Default Profiles tab headline is wrong.
    "I certainly understand why you would think (that ColorSync's RGB Default setting is Assigned to iPHOTO documents that do not contain embedded profiles), but that's not what happens. Untagged images are instead represented by the profile of the preferred (Default) display," said John.
    It appears some people at Apple understand the issues -- default 1.8 gamma, default monitor RGB, trying to set up ColorSync option to set a Default RGB -- but it also seems like Apple is very slow and stubborn to change...

  • Strange image when inserting cross dissolve

    Hello,
    I am having an issue with the cross dissolve. Everytime I insert it, doesn't matter where, mid-way through the transition a frame shows up from an earlier (30 sec back) portion of footage. I tried trimming the clip to see if it would work and no luck. I'm running the latest update of FCP-HD on a Dual 2GHZ G5. Help would be greatly appreciated. I need to get rid of this phantom image. Thanks.

    Hi Daniel,
    This is not a solution but might help you get some work done.
    You are not alone in experiencing this. In addition to what you describe, I've gotten the same effect a few times when I used a slug or color matte on a higher video track to create a transition.
    In my case I found it was only happening when I was "pushing" the system – ie lots of sequences open, very large project, numerous nests, etc.
    I quit and did a restart. Then I created a new project with "shrink" appended to the title. Then I opened the large project and dragged over a subset of what I needed to my shrink project. I closed the large project.
    The problems disappeared. Sorry I don't have anything more definitive, and I hope that helps.
    Tom

  • Does iOS modify images when saved to camera roll?

    As in, if I save an image from gmail so that I can then upload it to Dropbox, will that resulting image file still be the same raw uncompressed image as if I did it directly on a PC?
    This has been a big concern for me for years, I've always avoided it by using RDP when I need to save a picture I want to keep.

    Should I ask this under iPhone instead? Or perhaps there's a better forum to ask?

  • Lost pdf image when saving from 'print'?. Michael

    I have suddenly lost the ability to save as pdf from 'print'. It still save but the image is lost. I can still save as pdf after a scan. I am not aware of making any change, although adobe reader did an update the other day?!.Can anyone help please

    mibatch wrote:
    I have suddenly lost the ability to save as pdf from 'print'. It still save but the image is lost.
    Are you sure that you are saving to correct folder, for instance I have Desktop selected?

  • Firefox is redownloading images when saving, instead of saving them from the cache

    This happens with every image, whether the website is properly cached or not.
    Firefox insists on re-downloading the image instead of fetching it from the memory/disk cache and I find that behavior to be unacceptable.
    I have already tried:
    Changing browser.cache.check_doc_frequency to 0 or 2
    and setting browser.download.manager.scanWhenDone to false.
    The second actually worked for a while when this first started happening, but then it started again, probably after one update or another.
    I don't want an add-on specially for this (unless it actually works with the usual save/save as functions), this should be a default or at least toggle-able behavior for any browser.

    That doesn't fix the wrong default behavior of firefox. It just means I will have more clutter when I right click things. Unless it actually replaces the "save image as" option.
    Even so, you shouldn't require an add-on for that.
    Sorry, I'm really annoyed by this behavior returning to firefox yet again and this time, I can't seem to fix it.

Maybe you are looking for