Gif images, pixels and hex colors

I'm not a java developer, though I at least have attempted to learn it. This may be a strange place to ask this question but java keeps coming up in my search so what the heck!
I am a highschool biology teacher-to-be and I am trying to design a lesson about DNA transcription and translation. I want the students to play a game where they take hex color codes (codons) and place a color card (amino acid) the hex code represents so that they build a big pixelated picture (the protein). I don't want to do the work of writing down the hex code for each and every pixel of the image, and was hoping there was some way to reveal as a list the hex color of each pixel in some sort of ordered fashion. I tried just dragging a gif file into a text program, but that didn't do it, ha!
Any ideas?
Thanks

mport javax.imageio.*;
import java.io.*;
import java.awt.image.*;
public class Test {
    public static void main(String[] args) throws Throwable{
     BufferedImage bi = ImageIO.read( new File( args[0] ) );
     for( int x = 0; x< bi.getWidth(); x++ ) {
         for( int y = 0; y< bi.getHeight(); y++ ) {
          System.out.print( Integer.toHexString( bi.getRGB( x, y ) ) + "," );
         System.out.println( "" );
}Compile:
javac Test.java
run:
java Test theNameOfImage.gif
??

Similar Messages

  • Not showing image in basic copy gif image icon and place on html page

    Trying to do a basic copy gif image icon and place it on a basic html page.
    The image shows up in my local page and shows on remote side but when I go to view in browser it does not show as a image. It shows the border but no image.
    The directions were (working with windows xp and IE8)
    Download the image to your C:\temp folder.
    4. Copy the gif file from your C:\temp folder and paste it in the same folder where your .html or .asp file is.
    I copied the image with right click save as in many different areas of computer. I even put on desktop.
    I add image and it shows on the site I am working in but when putting to remote side it does not view as an image on the browser.
    I have cleared cashe as well as pressed cntrl/refresh and still nothing.
    Other images work and show.
    on-line-vacations.com
    Thanks!

    Basic assumptions:
    You have Defined a site.
    All files reside within the defined site (including image files)
    All files use the appropriate file extensions, for example, image.gif
    You have saved and uploaded all site files to your server.
    You are EXACTLY naming the source image (no errant capital letters) in the link.
    If your other images are linking properly and showing, delete this image and insert it again (or re-link it to the image file within your site structure).
    Z

  • Screen turns pixelated and crazy colors! WHY?!

    Hey, so I've had my MacBook Pro for a while and have never had any problems with it, but recently it's been doing this super weird thing.
    When I'm on the internet (I use FireFox) and I go to a page that I need to input a username and password, I use an AddOn called Sxipper that remembers all my stuff for me. So when I'm on the page and Sxipper comes up with the list of my usernames and stuff, it used to just dim the rest of the page. Now, instead of dimming the page, it changes the colors to be all whacky and pixelated and I don't know why or how to fix it.
    I've tried uninstalling Sxipper but it still happens on some sites, like sites that have changing ads on the sides (when the ads are changing, they change colors around super fast and then when they are ready to be the new ad the colors go back to normal). It also happens when I'm typing an address into the browser, All my stuff is up to date and I've tried running TechTool to see if there are any problems, but it says everything is fine.
    Here are some pictures of what happens so you'll know what I'm talking about:
    http://i3.photobucket.com/albums/y59/whathome17/Picture2.png
    http://i3.photobucket.com/albums/y59/whathome17/Picture5.png
    http://i3.photobucket.com/albums/y59/whathome17/Picture4.png
    http://i3.photobucket.com/albums/y59/whathome17/Picture6.png
    PLEASE HELP! Thanks.

    Hello,
    FYI... <When I'm on the internet (I use FireFox) and I go to a page that I need to input a username and password> Why not allow Keychain which is in your Applications/Utilities folder do this for you instead of a 3rd party application...
    Also, there's a utility on the net you can download to UNinstall software.. it's called:
    AppZapper and available here: http://www.appzapper.com/
    Next, get a good disk utility, several here to choose from:
    If you don't use one, there are several disk utilities available to use.
    Onyx, is free and available here: http://www.versiontracker.com/dyn/moreinfo/macosx/20070&vid=476445&mode=info
    or
    MacJanitor is good also: http://www.versiontracker.com/dyn/moreinfo/macosx/10491
    or
    and AppleJack here: http://www.versiontracker.com/dyn/moreinfo/macosx/19596
    I suggest downloading from Version Tracker so you can view the Reviews/Customer Feedback and make a decision based on the information provided by users.
    Carolyn

  • Red logo is pixelated and the color is different

    Ive been trying to render a video for a while and cant seem to solve my problem. Im working with a very special filesize: 300x250. On my timeline,I have my video (which I edited in Premiere and then Imported in AfterEffects) and a top layer which is a red logo (png file made in Photoshop). On my timeline it looks fine even when it plays, but when I rendered it, the color red is off (in the original its more red-orange and comes out blood red) and the logo is pixelated. My finished video needs to be in a flv format. I think Ive tried anything that I know and still cant find a solution. There must be someone somewhere with a solution.
    Im working on a pc with AfterEffects CC.
    Thank you

    The brand Im working for needs to remain confidential, but heres the reds inside my logo. Its like a gradient red.

  • Photobook cannot printed. FIle sent contains images shift and without color

    I have tried to buy a photobook, but everytime that I sent the order I always got an e-mail telling me that the order cannot be printed because:
    "Upon shipment of your order, there was an error and the image file can not be printed. The file received contains shifted images or without color."
    They gave me the following suggestions:
    a) to update my MacOSX software, but I got already Lion.
    b) to update iPhoto software, but I got iPhoto '11 (version 9.1.5) and I cannot find new version.
    I tried to make the .pdf preview sometimes I can see the problem too, but sometimes the file looks perfect, so I have placed the order but without any luck.
    I have contacted the Italian Apple Assistance Center they told me that it could be due to the effects given to the pictures, but I didn't use any strange effects.
    To give you more details I have used a Canon EOS500D camera
    Honestly I am facing this problem since I have upgrade my MacOSX to Lion.
    Any suggestions?

    Hello,
    Are you using a macbook air?
    I have the same problem, but only on the air and not on the imac.
    I already tried two different airs, both have the same problem.
    I just started a similar thread: https://discussions.apple.com/thread/3354990?tstart=0
    Best regards
    Ben

  • Pixels and colors too low

    After upgrading my video card drivers, geforce8600gt, I get a error message in Photoshop elem. 5.0 saying it needs 1024x768 pixels and 256 colors so wont let me view photos
    I have 1680x1050 and 32 bit high colors.How do I get 5.0 to see this?
    Thanks in advance,....

    Do you get this error when you start the Organizer, the Editor, or both?
    Let's find out what the Organizer thinks your display resolution is.  Using the instructions in this FAQ, post the entire contents of the Log.txt file here:
    http://www.johnrellis.com/psedbtool/photoshopelements-6-7-faq.htm#Examine_the_Organizers_l og_file
    Next, let's find out what Windows is reporting for resolution and colors:
    - Vista: Right-click your desktop, select Personalize, Display Settings.
    - XP: Right-click your desktop, select Properties, Settings tab.

  • Quicktime 7.6 on XP - MOV files pixelated and color is distorted

    I have reinstalled QT 7.6 on my XP SP3 system several times. I am still getting distored video, pixelated and distorted color, when I play MOV files.
    Any ideas where to start to fix this? Thank you.

    QuickTime Control Panel / Advanced tab. Check the box to use "safe mode" (video).

  • Export via Quick Time ends up being pixelated and poor quality

    I shoot my student film on an Arri S camera with 16mm color stock. I got my film back to me from the school on a DV tape and imported it into FCP HD on my camcorder. When I went to export it onto a DVD for my actors, the film looks horrible! The blacks are really pixelated and the colors aren't as crisp as they were on film. I was told that it should look the same because we made the movie on better equipment and FCP won't lessen that, but at the same time FCP can't make poor quality work any better. Can someone tell me how to export my film without losing the 16mm quality. I don't want it to look digital, I spent a lot to get the real film stock. Thanks!

    1- The film is 6 minutes long
    2- I don't know where to find out about the bit rates
    3- The audio is simple, just 48 khz stereo.
    When using DV format, what's the difference in DV, DVPRO, etc.?
    The movie was filmed 24 fps, but then put onto a dv tape for me, so I assume they transferred it at 29.97 fps. Should I now use NTSC or stick to PAL? Basically, anymore compression makes the film look really bad and unusable for festivals, which ultimately was the whole purpose of my blood, sweat, and tears behind this film.
    Thanks for all your help and any more questions you need answered to solve this problem I'd be more than happy to answer.

  • Image manipulation and keeping its size same

    Hi
    I am working on an iPad application which allow user to redact portion of an image. Currently i have added UIView to my imageView and draw brush path using UIBezierPath and save the image by taking snapshot of my Uiimageview. Everythings working fine except the image size, suppose my image is of 1.5 Mb then after saving an image it reduces to 0.5Mb.
    My requirement is that after saving image my image size should not reduce.
    if (UIGraphicsBeginImageContextWithOptions != NULL) {
                UIGraphicsBeginImageContextWithOptions(self.imageVw.bounds.size, NO , 0.0);
                [self.imageVw.layer renderInContext:UIGraphicsGetCurrentContext()];
                viewImage = UIGraphicsGetImageFromCurrentImageContext();
                UIGraphicsEndImageContext();
    This is what i am using to save an image.
    Is there any other way to manipulate image without losing its size. For example reading image pixels and writing and replacing new pixels to it?
    Looking for your answer.
    Thanks.

    Any help would be appreciated...

  • Share gif image without conversion

    Hello,
    I have an application (universal app) that generates gif images. And I want user to share gif image.
    The problem is when I try to share by using next code:
    DataTransferManager.GetForCurrentView().DataRequested += (DataTransferManager mgr, DataRequestedEventArgs ar) =>
    //dataPackage.SetHtmlFormat(HtmlFormatHelper.CreateHtmlFormat(
    ar.Request.Data.Properties.Title = (string)DefaultViewModel["title"];
    ar.Request.Data.Properties.Description = (string)DefaultViewModel["description"];
    ar.Request.Data.Properties.FileTypes.Add(".gif");
    List<IStorageItem> l = new List<IStorageItem>();
    l.Add(file);
    ar.Request.Data.SetStorageItems(l, true);
    DataTransferManager.ShowShareUI();
    The gif image is converted to jpg.
    Is there any way to avoid conversion?
    Thank you
    no where man
    http://www.nowhereman.eu

    Exactly how is it converted to .jpg? Do you mean the file format has changed? If you can, please upload a project to OneDrive that shows this problem.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • If I try and follow a link from another website to open another I get awclick.php (GIF Image 1x1) pixels in a new tab instead of the web page I want.

    I was trying to open a website as a link from another website and I get a new tab that says
    awclick.php(GIF Image 1x1 pixels)
    I can open the website without clicking on a link to it by just typing in the address but as this is a cash back site I am linking from it doesn't help!

    You're welcome

  • When following a link, some sited do not display and the heading reads "clk (GIF Image, 1 x 1 pixels)"

    When following some links, the displayed page is blank and the header shows "clk (GIF Image, 1 x 1 pixels)". These are usually links from advertising sites or email promotions. I suspect that they are paid for links and somehow the logging info is causing this problem. It has only recently started to happen, so I suspect that a recent update has caused it.

    Some firewalls like Kaspersky can block content and send a 1x1 GIF image instead.
    Kaspersky: Protection > Firewall > Filtration system: disable the "Banner Ad Blocker"
    See:
    * [[Configuring Kaspersky Internet Security]]
    * [[Firewalls]]

  • Pages fail to load and instead show "invis.gif 1x1 pixels"

    Leopard 10.5.1, Safari 3.0.4, Mac Book Pro, Airport to Linksys WRT54Gv6 to Cable Modem.
    Sometimes, while viewing certain pages, Safari will fail to load the page and instead show "invis.gif 1x1 pixels" in the window title bar. The content area is plain white. Ironically, this is 100% reproducible when trying to reply to a forum post here.
    With the Debug menu enabled, Web Inspector shows the following warnings:
    * Resource interpreted as document but transferred with MIME type image/gif.
    * http://discussions.apple.com/post!reply.jspa?messageID=6033688
    * Resource interpreted as image but transfered with MIME type text/html.
    * http://discussions.apple.com/favicon.ico
    I've seen this failure before while randomly browsing the web, but this is the first URL I've come across that is 100% reproducible. Firefox 2.0.0.11 and Opera 9.24 don't have a problem loading the page on the same computer.
    Thoughts?
    Kenny

    Thanks iBod! I spent an hour at the local Apple Store and walked away with no solution. But the guy did say check the discussions board and I was also running into the following messages in my title bar:
    adclick (GIF Image, 1x1 pixels)
    click (GIF Image, 1x1 pixels)
    (GIF Image, 1x1 pixels)
    I had tried a trial version of NetBarrier that came with my Virus Barrier and Personal BackUp and when I deleted the app my problems began. I had no idea it was the culprit because it happened in both Safari and Firefox.
    Well after reading your reply...
    I went into Preferences and deleted the folder called "Net Barrier" and no more problems.
    Thanks again!
    Next time I'll check here first!

  • Exported Raw Conversion Image Resolution and Assigning a Color Profile, etc

    In Aperture 1.1, although I set the exported Raw conversion image resolution to 300 dpi in the preferences, it continues to come out at 72 dpi which is something of an inconvenience. Also, is it possible to assign a color profile to the "exported version" so that it is congruent to my PS CS2 color workspace (if that is what its called). Is this program capable of carrying out a conversion as a background operation? Finally, can the layout windows be configured so that they remember how they have been used in the past? Thanks.

    Iatrogenic huh! Cool!
    Anyway, I'm not real clear on what it is you are trying to accomplish. Despite your obvious vocabulary skills, there seems to be some disconnect relative to what you are trying to accomplish. You are right that "exporting a version" in Aperture is roughly equivalent to what happens in ACR when you "Open" a RAW image into Photoshop. In both cases you have, hopefully, already done the adjusting of parameters you want prior to "exporting", or "opening". When you "open" or "export" you wind up with an "image" composed of pixels, whereas in the RAW adjustment phase you are just working with a temporary thumbnail and a set of mathematical instructions. Big difference, I suppose is that when you "open" and image from ACR into CS2, the resulting image is truly just pixels and has not had a "file type" applied to the file yet, until you "save" it, while in Aperture, if you "export" a file to CS2, or to the desktop, you end up with the file type already applied. Presuming you "export" a 16 bit TIFF or PSD, there is no operational difference.
    I could be wrong, but with the new Bayer Demosaicing algorithms in Aperture 1.1, and the Camera RAW adjustments, you should be able to come up with an adjusted image that is VERY close if not identical to one done in ACR, with the possible exception of lens abberation adjustment. I was very critical of the RAW adjustments in 1.0.1, but I am very happy with the capabilites in 1.1. That said, I think there is still some room for improvement in user friendliness of some of the adjustments such as Levels.

  • How to change the color of 1px_trans.gif image of interactive report

    Hi All,
    Iam using interactive report in apex3.2
    I need to change the color of 1px_trans.gif or remove the image in search tool bar
    where we can change.
    pls tell me .......
    Thanks & regards
    Balu..

    I need to change the color of 1px_trans.gif or remove the image in search tool bar 1px_trans.gif is transparent and doesn't have a colour. It is used as a shim image&mdash;an outdated way of controlling the dimension(s) of some element(s). It's intended to be invisible. Giving it colour will cause it to become visible, resulting in all sorts of unexpected and unwanted lines (or worse, solid areas of colour) appearing throughout applications.
    What do you think you want to do? (Whatever that is, it will almost certainly not be achieved by changing the colour of 1px_trans.gif...)

Maybe you are looking for

  • Business Partners - Alternate Payee Details

    Dear Members, I have a Business Partner, a supplier that has requested that we pay their invoices to a u201Cfinance companyu201D instead of them. How can I setup their records so that the payment file for upload to our bank i.e. the electronic funds

  • Sales order availability

    Dear all, I am developing a report which is a day-wise report, where I need to display the opening stock as on date that is the closing stock for yesterday if he is running the report today morning u2013 MMBE can help? And second is the production st

  • How do I synch multiple ipods to my iTunes

    I have 3 iPods - a mini, a nano, and a regular kind. How can I synch them all to the same computer containing iTunes? I also want to download different contecnt on each, as I have far more content than the amount of space on the nano...and of course,

  • Select-options in Smartform

    Hi all,         Is't possible to use Select-options in smartforms, If so how to use. Regards Suprith

  • FRM-92101 No longer being raised

    After applying (9.0.4) Patch Set 1 (9.0.4.1.0) and OPatch 3901078, when a forms session is aborted (due to an Access Violation or having been killed from OEM) the applet on the client simply hangs. Prior to applying the patches, this would have raise