Editing a PNG palette in AWT

I am loading a PNG using
ImageIO.read(new File(IMG_LOC));
and storing the BufferedImage returned. Now I want to take that BufferedImage and modify the palette.
The palette must first be read, analyzed, and then re-written. Basically, I am using the palette to store some meta-data about the image itself. Decoding the palette that has information, basically a hidden image, and then modifying the palette to show this hidden image, is my goal. I cannot figure out how to read individual palette entries and then modify them to create a new BufferedImage for display.
I assume I am going about it the wrong way because I can't find a way to modify the WritableRaster or the ColorModel that can be retrieved from the BufferedImage.
Is there a different object structure I should be looking at for reading a PNG, reading the palette, modifying the palette, and then recreating a java.awt.Image for display?
Message was edited by:
Zilatica

Well, I was expecting something atrocious, but the web site looks good. The graphics look good and the colors are very nice. The markup only has a few errors that are not fatal. Adding a doctype would likely generate more errors, but that's not a bad thing. By "errors," I refer to what shows up using the w3c validators:
html validator
css validator
You have no css errors. Congratulations! Of course, you have no css.
So, here are my thoughts. If you are just a guy who wants a web site and you don't know much about web design, this site will work for you for the time being. If you are interested in learning web design, learning html, css, and dreamweaver, recreating this site would be a great project for you while the current site is online. If you are a web designer, you should bring this site up to standards using html for structure and css for layout and presentation.

Similar Messages

  • Edit a Color Palette to Reduce Colors

    I am trying to reduce the number of colors in a file.
    If I save for web devices and reduce the number of colors, Photoshop appears to go by volume, rather rather than distinctiveness. Area of distinct colors get merged and multiple shades of similar colors stay.
    Is there any way to edit the color palette so that I can explicity merge colors. Make all A and B, A.

    yes, covert the image to Indexed Mode and then you can select how many colors you'd like your image to contain (I believe it's up to 256 colors in this mode). Image/Mode/Indexed Color and then once you've selected your color scheme, you can convert it back to RGB mode.

  • Can I draw *.bmp, *.png in java.awt.canvas ?

    In paint method of my program, I get image from Toolkit like this:
    public class CanCanvas extends Canvas{
    //In loadImage method
    Toolkit.getDefaultToolkit().getImage(
                        getClass().getClassLoader().getResource(
                                  resource.getString("bg.jpg")));
    //.... In paint method
    if (image != null && image.size() > 0) {
                   for (int j = 0; j < image.size(); j++) {
                        Image image1 = (Image) image.elementAt(j);
                        Rectangle rectangle = (Rectangle) imgLocation.elementAt(j);
                        g.drawImage(image1, rectangle.x, offset + rectangle.y,
                                  rectangle.width, rectangle.height, null);
                        i = i <= rectangle.y + rectangle.height + 7 ? rectangle.y
                                  + rectangle.height + 7 : i;But there is something very strange, if my image is *.jpg or *.gif, it runs ok, otherwise -*.bmp, *.png-, it can't draw the image.
    Would anyone tell me why ? Is the reason java.awt.canvas ?
    Thanks in advance ^ ^

    If you'd bother to read the documentation of the methods you're using, you'd know:
    http://java.sun.com/j2se/1.4.2/docs/api/java/awt/Toolkit.html#getImage(java.lang.String)
    Returns an image which gets pixel data from the specified file, whose format can be either GIF, JPEG or PNG.

  • Edit a png file... change colors and text and then export to gif?

    First I want to state that I am VERY new to Fireworks and I am trying to figure out how this works!  I typically use Photoshop.
    I was sent a PNG file (from a friend).  The file has many buttons on it that I believe are somehow saved or exported out as gif images to be buttons on her website.  All of the buttons are basic rectangles that are gray with black text.  She was told she could edit all of the buttons quickly in Fireworks (change their color, font color, etc) and it would change them all together.  Then save them all out so we would have the individual gif files for the buttons to save to the directory.
    So... I am able to open the png file in Fireworks and I can select each button or all of them, but I cannot see how to change their color and font, etc.  I know this must be very simple!  Can someone help me?
    Thank you!
    Sharlyn

    Have a look in the ocument Library panel to see if the buttons are Symbols. If yes, then double click on one of the buttons to open it in the symbol editor where you can easily make changes in all of them at once.

  • Edit Predefined Colour Palettes

    I've created one predefined palette by editing a defaultConfig.xml file (there are several).  However, the format of the xml doesn't appear to allow set up of further predefined palettes.  Although from the Webi front end, I can see that there are a total of 10 predefined palettes.  Does anyone know where they can be configured?
    Another option is "Customized document palettes", but this is sub-optimal as they only persist in the current document.

    Hi,
    In XI 3.1 we could work around that by changing the XML files so default a different color was used. In SAP BusinessObjects BI 4.0 the chart engine has been changed, now there is one chart engine for WebIntelligence, Analysis and Crystal Reports. So if you need a house-style for your reports, follow the next steps.
    1. Your administrator needs to go to the following directory on the server side C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\images
    2. Find the file there named as VisualizationConfig.template.xml
    3. Rename this file to VisualizationConfig.xml
    4. Then edit this file and add the color for the palette as you required (RGB colors are used)
    5. Check there are no errors in the config file, otherwise the standard palette is applied – you can define only one Corporate palette, and the palette ID must not be changed
    6. Finally, you need to reboot Tomcat after editing the config file.

  • "dir.mnu warning" after editing the function palette

    Hello everybody!
    I´ve got a small problem, which is getting on my nerves! I created a new subfolder with vi´s in the function-palette (with the advanced palette tool)... after all i deleted it, because now i use other vi´s. So the problem is everytime i open a vi of my project which has something to do with the "signal processing palette", i got this warning that the "dir.mnu" has changed.
    So far i created a new project, but the problem is still there... How can i restore the default palette settings? Can i delete the false dependencies? Or are there global files i can delete and then labview uses the default palette?
    Thanks,
    Michael
    Attachments:
    warning.JPG ‏28 KB

    I think when i installed Labview, there was a symbol for every VI in the function-palette. Could it be that i somehow have overwitten the defaults in the ...\National Instruments\LabVIEW 2009\menus folder? So thats why the "restore defaults" button is grayed out, because these ARE the default values. Is it possible to get the "dir.mnu" for the signal processing subpalette (...\National Instruments\LabVIEW 2009\menus\Categories\Signal Processing\dir.mnu) of somebody?... Reinstalltation is al little more complicated, because the DVDs are at our computer administrative department.
    So, thanks for your help....
    Michael
    Attachments:
    palette.JPG ‏37 KB

  • Office Mac 2004 S and T edition - Word - formatting palette disappears!

    Open word document, click on 'formatting palette' in the toolbar, and lo! it 'genies' down and disappears off the bottom of my screen!
    I've tried changing the screen settings, 'resetting' the toolbars, even uninstalling and reinstalling Office 2004, but all to no avail. It has only just started to do this, and is proving to be dashed annoying.
    Does anyone have any pointers?
    Many thanks...

    Since Office is not an Apple product you'd probably be better off posting your question on MIcrosoft's own forums for Mac Office, as they would be more focused on the issue than an Apple forum about compatibility issues between Mac OS and Windows:
    http://www.officeformac.com/productforums

  • Will anyone tell me how to code a PNG editor?

    I want a PNG editor, which provides user a palette to edit a PNG icon and then
    save into a PNG file. The icon is 16x16 in dimension and has transparent colors.
    Can you tell me how to do it. Thank you very much.

    I want a PNG editor, which provides user a palette to
    edit a PNG icon and then
    save into a PNG file. The icon is 16x16 in dimension
    and has transparent colors.
    Can you tell me how to do it. Thank you very much.Sure... install JAI, write an editor for generic images, and add the ability to save as a PNG. This way you're not just limited to PNG files, though initially you could only allow saving as a PNG. JAI reads/writes jpg, gif, png, tiff, bmp, etc. Some of these do not support transparency, but that's not too hard to limit at save time.

  • How do I make Flash use the original Photoshop file, not a .png one?

    Hi, this might be kind of a basic question/problem but I can't seem get Google to help me. Since I've recently started out with Flash, I guess I just missed some newbie thing out, still very greatful for help though, since this'll soon be causing a brain hemorrage...
    Ok, here goes: 
    I'd like to draw key frames in Flash, just simple drawings/skelettons using the pen tool, basically to create the movement itself. After that, I want to export the frames that I drew as images to Photoshop in order to apply texture and colour, and then put them back into Flash again, without tampering with the Flash doc I've already created, since the animation is already done. I want the file(s) that I'm working with to remain the same files throughout the process, from Flash to Photoshop and back to Flash again, like the way InDesign works. Is this even possible?
    If this isn't possible at all, I guess the alternative is to draw in Photoshop and then import the drawings into Flash, put them in order and then make any eventual changes after you've created the animation in Flash, this is less smooth though still possible. But here emerges (sort of) the same problem:
    When I import images from Photoshop, create animation out of them, and then realize I have to make some changes in the original PS pic file I head back to PS to correct it. But it just doesn't work the way I want it to... If I modify the pic file in PS, then use the "update" alternative in Flash Library, Flash just tells me that the file can't be found, and does not update the image. If I choose the "edit in PS"-alternative from right clicking on a symbol that is in the library, the file opens as a .png file in PS, not as my original file! It seems to me that Flash is creating its own library, not using the existing document. Is there anyway to go around this? How do I make Flash use my PS file which allows me to change it as much as I want (as with InDesign)?
    This is driving me crazy, what I'm working on is supposed to be full HD, I can't use a freaking .png file... Gah!
    Very many Thanks in advance!
    (If anyone has any suggestion for alternative software, that's also very welcome!)

    If you start the artwork in Flash, you are starting with a vector drawing. If you export this art as a .png so that you can edit it in Photoshop, you will be translating the artwork to a bitmap image at a specific resolution. When you edit this .png in Photoshop, you can save it, as a .png, and then import that .png into Flash.
    After you import the .png, place it on the stage in a new layer. Position the new artwork over the old artwork. Then throw away the original artwork. Now, when you want to edit the artwork, go to the original file in the movie's Library and select Edit with Photoshop. When you save the file in Photoshop, the updated file will appear in the Flash movie.
    If you have Illustrator, you can export your original artwork as an Illustrator file. Then you can open this file in Illustrator, edit it, and save it. Then, as above, import the .ai file into Flash and toss out the original. Now you can edit the original file through the Library in your Flash movie.
    Alternately, you could start by creating the artwork in either Photoshop or Illustrator. Then import that art into Flash. Now you have a link to the editor for either file in your Library. This may simplify things.
    Working with Photoshop and/or .png files will give you a larger finished file than working with Illustrator files. In either case the finished resolution of the Flash movie will be the computer's screen resolution, 72 ppi.

  • ¿How can I edit a Photo without mask and remain without mask?, ¿How can I edit a Photo without mask and remain without mask?

    I want to edit an .png or .jpg image which has no mask and, once edited, that image could remain without mask.
    ¿Is it possible to do this with iPhoto and how?
    Thanks and regards.

    iPhoto has no layering or masking. For that kind of work use an external editor:
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate or the App Store.
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • I have Adobe Premiere Element 7 installed and I use that as to editing my video's. I am having such a hard time trying to lightening a dark video. I tried everything but nothing is working. Please help

    I have Adobe Premiere Element 7 installed and I use that as to editing my video's. I am having such a hard time trying to lightening a dark video. I tried everything but nothing is working. Please help

    saloumehdaghighi
    Premiere Elements 7, on what computer operating system?
    In Premiere Elements 7, there are various effects for lightening a dark video. After applying one of these lighting effects, have you been editing these applied effects in Edit Effects/Properties Palette after you apply them?
    Video Effects
    Adjust - Brightness and Contrast, Auto Levels....
    Image Control  Panel that is a default Properties Palette panel along with Motion and Opacity....for Brightness, Contrast, Hue, and Saturation.
    ATR

  • "Edit Original" opens in Paint instead of Photoshop (Windows)

    I've found a solution to this problem, so I wanted everyone to find it. In the older Windows programs, you can choose which program opens in editing, but in Windows 7 that feature is disabled. If you download the following program, click File Type Settings > Context Menu > then, for example "PNG" extension-- you can choose which program OPENS a PNG, which program EDITS a PNG, etc. That way you can view a photo in Windows Photo Viewer, but edit in Photoshop. Brilliant!
    http://defaultprogramseditor.com/

    Hi, I've downloaded the program, it's just sitting there and give this message when I double-click it! Even when using "Run as administrator".

  • Create installer for creating a palette

    My query is to create a installer (setup.exe) file  so that if i install the file then it will create a function palette (of my custom vis) in labview auitomatically.
    Like in the link below modbus installer is there: when installed it creates a palette in the user libraries.
    http://digital.ni.com/public.nsf/allkb/47F89816179​2C62F8625756A005D0E7E.
    I have gone to through the link below but it gives idea about adding, editing or deleting palette manually.
    https://decibel.ni.com/content/docs/DOC-8742
    Regards,
    Shrenik

    Dear shrekt
    I am also trying to do this with out VIPM. Is it possible without VIPM or not? I am using LabVIEW 2010.
    regards

  • Confused about color profile support in PNG

    NOTE -- you have to hover over the image to see the real images.  The images embedded in the webpage have their profiles stripped -- just like photoshop does!  Interesting.
    I ask a similar question on this before, but couldn't give a satisfactory demonstration of how photoshop doesn't support color profiles in png's.
    But now I have a great one.
    Picture A: this is with the correct color profile and displays correctly in firefox and probably other browsers -- also displays correctly on windows desktop and in large-icon view. 
    Ok, anyone who doesn't believe me, grab that image and try to read it into photoshop...
    I do, and get no warning on profile mismatch like I do on jpg's or tiff's:
    photoshop strips the existing profile and adds sRGB which isn't the correct profile.
    This is how photoshop transforms good colors into bad:
    Completly screwed up.
    I have had multiple people notice how my png saved images from photoshop had "off" or bad colors -- usually washed out in comparison w/my monitor profile.
    I can get 'ok' results if I flatten the image and *convert* my existing profile to sRGB -- and I usually get
    something that looks 'acceptable'...though the jpg's render in accurate color.
    Basically, photoshop can't read or write png web images. and maintain color fidelity unless they have no profile.  Even if they have an sRGB profile, I usually get washed out looking pics if I don't strip it but let adobe convert it.
    In googling for my own problem, I found references to this problem in Adobe Photoshop going back to 2002.
    Why does adobe refuse to fix this?  It's horrible.
    They could fix it with a file plugin for existing CS5-6 users, but it really needs to get fixed and Adobe needs to stop ignoring this problem.
    :-(  I find this extra depressing because I prefer to distribute my pictures losslessly in png,  but with photoshop, I'm left with lossy jpegs to get accurate color reproduction.

    How did the SFW thing even come up??  When I embed profiles in jpg and tiff, I do it as part of the File Save or File Save As dialog.  I can choose what profile to save it with -- and I usually save it with my currently calibrated monitor profile -- as that color profile is what was used to create the picture.  Why would I want to convert them to some other profile??  Only thing I have needed to convert have been PNG's because it doesn't embed my monitor profile in the PNG the same way jpg and tiff do.
    If it did, png's would look the same as jpgs and tiffs... but the jpgs and tiffs have the full depth of color and look the same as they do in PS.  png's look washed out because -- it's been my belief that PS is not storing my profile in the png, but setting a bit in the file to use the sRGB profile. 
    AFAIK, PNG provided for a sRGB profile-compat bit -- so images that were compat w/that profile could just set a bit rather than including a profile.  I see no evidence that PS is saving my monitor profile with the PNG.
    My 'settings' for RGB are to convert to working RGB profile which is my monitor profile.
    I do have it set to ask me abou profile mismatches on opening or pasting.
    Since I don't get a 'this document has a different color profile than the working space'
    message when I edit most png's, I assume it has none.  Thus from my settings
    it should autoconvert it to my monitor profile and save that on save -- which seems to be what happens when I save as jpg or tiff (or I can check off the box to save profile...but I usually don't).

  • Different color other then selecting one from the tool palette

    Hi Guys,
    I want to change the background color of my form according to my companies default color scheme. This color is not available in the fill color option from the tool palette. How can use a diferent color?
    Please help, I really need to do this.
    Regards,
    Imran Baig

    Why you can use the custom colour palette...
    <this is 9i>
    To create an user defined colour palette:
    1. Take Edit>Preferences
    2. Change Colour Mode to Editable
    3. Press F2 to get the Layout Editor (Note that the layout editor is opened only after step 2)
    4. Take Edit>Layout Options > Colour Palette
    5. You can use this pop up to define custom colours
    6. To reuse the colour palette you have to save it.
    Take Edit>Export>Colour Palette
    Save your custom Colour Palette as say Custom.pal
    9. Now to reuse this colour palette in a new form
    Take Edit>Preferences
    Give the full file path of Custom.pal in the Colour Palette Text Box.
    10. To use the colour palette in an existing form
    Take Edit>Preferences
    Change Colour Mode to Editable
    Take Edit>Import>Colour Palette to import Custom.pal in to your form

Maybe you are looking for

  • ACROBAT XI - DOES NOT WORK WITH WINDOWS VISTA

    WHY DOESN'T THE COMPANY STATE ACROBAT XI PRO DOES NOT WORK WITH WINDOWS VISTA. THE COMPANY NEEDS TO WARN PEOPLE.  THE ACROBAT TECH SUPPORT FINALLY FIGURED OUT THAT IT'S NOT COMPATIBLE WITH WINDOWS VISTA.

  • Converted MS Word 2007 to Adobe Acrobat 9 random "Bad Parameter" Error

    Question: I Converted MS Word 2007 file which contained 892 pages into Adobe Acrobat 9 Standard afterwards and while needing to update only certain pages I receive the "Bad Parameter" Error. My process is using drop down Document/Extract pages(make m

  • External Authentication with Java Card through HSM

    Hi All, How to do External Authentication process in Javacard through HSM (Hardware Security Module). Does any HSM supports this? My requirement is to store the Card KMC in HSM and i should authenticate the terminal application with the Java Card thr

  • RE: (forte-users) Optimal number of records to fetch fromForte C ursor

    The reason why a single fetch of 20.000 records performs less then 2 fetches of 10.000 might be related to memory behaviour. Do you keep the first 10.000 records in memory when you fetch the next 10.000? If not, then a single fetch of 20.000 records

  • How do I add a scratch disk?

    Is it beneficial or asking for grief to add my external drive as a scratch disk? How can I do this? There seems to be no facility to do this in Preferences.