Setting the color depth of images

Hi,
could someone please let me know how to make images (VolatileImages in particular) have 16 bit depth? By default it seems to use 8bits. My monitor, card, etc certainly allow for better depth. I understand that BufferedImages can be of type USHORT_GRAY, but I certainly need a VolatileImage.
I need to produce a high colordepth grayscale animation (I need to be able to draw on the image, as well as to produce images from an int array - interpreted as an unsigned short array).
I have been looking at numerous class descriptions, as well as sample codes, and could not figure the solution.
Please help

Let me preface this with: I've not done this before, but...
It seems to me that once you are in the graphics mode you want, and you have loaded your image with ImageIO and have a BufferedImage of the appropriate configuration, then you can create a VolitileImage and use the GraphicsContext of that VolitileImage with a drawImage of the BufferedImage...
  Graphics2D g = myVolitileImage.createGraphics();
  g.drawImage(myBufferedImage, 0, 0, null);
  g.dispose();

Similar Messages

  • How to set the color to the particular row in a report

    Hi
    I have a report in which I have an edit link(I changed the id as edit link)..When I click that link, all the details(the whole row details) will be appearing on the items nearer to the report to save the changes....
    I want to set the color for the particular row when a link is clicked and the color should not be changed until I save the changes in items...After saving the changes, the report should come in the normal color...this is my requirement..i refered many forums regarding this...But could not find solution....If anyone knows,please help me...
    Fazila

    Here is how I would implement
    Create renderer
    Add SkinnableContainer element and create a skin for this container namely SkinnableContainerSkin
    find the fill section in the skin
    add bitmap fill to the fill section and give the source of the image which you are planning to use(Hopefully this is a direct way of doing, may be you need to hack this a little to get it to work)
    I've never tried this, but should help you give some idea.

  • How to set the color scale so that we can get same color for same intensity of color in various runs

    Hi
    I am trying to get the color pattern of mashed potato trays and diferent trays has different color intensity but if IF i am chsooing rainbow plateu it's giveing red color for dark region of each tray but two tray has different intensity of dark color. Can you suugest me how should I set the color scale so that I can distinguish which tray has higher degree of intensity of darkness.
    I will be obliged to get the suggestions

    Hello,
    Thank you for contacting National Instruments. I just have a few questions for you to help us clarify your application:
    What API, such as LabVIEW or C, are you programming your application in?
    Are you using Vision, and if so what specific functions are you currently using?
    Is the lighting consistent and just the color of the trays changing?
    How are you displaying the image in your program? Are you using an Image Display control?/li>
    Depending on what functions you have available, then we may be able to work on finding a way to distinguish between the different intensities. If you could provide a little information to your application based on these questions then will be able to better understand and help you with your app
    lication.
    Regards,
    Michael
    Applications Engineer
    National Instruments

  • How do I reduce the bit depth of images to 1-bit within Acrobat 9?

    I am hoping a simple solution exists within Acrobat 9 for reducing the bit-depth of images to 1-bit.
    I know of two methods that both seem more like workarounds. One, edit the image using Photoshop. Two, without Photoshop, export the page as a 1-bit PNG and recreate the page in Acrobat. It seems like one of the preflight fixups should be able to get it done with the right settings. But, it's a labyrinth of unfamiliarity.

    There's no predefined 1-bit conversion in Preflight because it doesn't make sense. Preflight will not dither bitmaps, so most images will become black squares. Extreme color conversion is only intended for text/vector objects.
    If you want to try it anyway, you can create a custom Fixup if you have a  1-bit ICC profile.
    Preflight > Single Fixups
    Options menu > Create new Preflight Fixup
    Name it something like "Convert all to 1-bit BW"
    Search for "Convert colors" in the type of fixup box and add it
    Destination tab > Destination > your ICC profile for 1-bit black
    Uncheck "use destination from Output Intent"
    Keep everything else as default, though I'd suggest using "Embed as output intent for PDF/X" if you're making PDF/X documents
    Conversion Settings tab > All Objects + Any Color (except spot) + Convert to destination + Use rendering intent
    Press the + key to duplicate this step, and change the second copy to "Spot Color(s)"
    Press + again and change the third copy to "Registration color"
    Save the fixup and run it.
    In case you don't have a 1-bit  ICC profile installed, I've attached one.

  • Dynamically setting the color of the title in a Panel

    Hello, I know I can set the color & font of the title in a Panel using the titleStyleName in a stylesheet.  How can I dynamically change the color though?  I have a component:
             <mx:Panel id="myPanel"borderColor="{this.color1}" />
    where this.color1 is a value that changes dynamically, and thus changes the border color.  How do I do this for the color of the text in the title?

    Hi,
    Try this
    var css:CSSStyleDeclaration = StyleManager.getStyleDeclaration(".myPanelTitle");
    css.setStyle("color",0x00FF00);

  • How can I set the size of an image in java?

    How can I set the size of an image in java? I have to choose the width and height of image...thanks to everybody...sorry for my english :-)

    Hi 43477
    Can you provide more details, do you want to setsize to display an image on a screen of when saving image etc?
    PS.
    There is a good invention called googlegoogle is good, but sometimes it's better to use more specific search, there is a search field avove on this page :)

  • How do I create a duplicate image inside the same page? Then how do I change the color of that image

    how do I create a duplicate image inside the same page? Then how do I change the color of that image from black to red?

    Hello there!
    Here is one way to create a duplicate image and colorize it. As you can see below, I have one image right now, that I want to duplicate.
    My layers panel looks like below.
    To duplicate your image, click the downward arrow on the right side of your Layer Panel.
    Select Duplicate Layer. This will duplicate the layer that the image is on.
    Select "OK" to approve the duplication.
    As you can now see in the Layers panel, the image is duplicated. The new layer is now at the top of the Layer panel.
    Now to colorize your image, go to Window > Adjustments.
    The Adjustments panel will now be opened. Select the Hue and Saturation icon as seen circled in red.
    The Hue and Saturation propertied panel will be opened. I selected "Colorize", and adjusted the hue and saturation bar to achieve the level red in my photo.
    As you can see below, the image is now red.
    Now i want to make sure only ONE of my image layers is red. I moved the Hue and Saturation layer to only be on top of the bottom layer. The image on the top layer now will not be affected by the red.
    Select the move tool, so I can now move the image layers so we can see both of them.
    With each image layer selected, you can take the move tool and move the images. I moved mine on top of eachother and you can see my red layer (bottom) and the non red layer (top).
    I hope that helps. i have also included helpful links.
    Please post back with any questions,
    Janelle

  • Link Color not changing for Visited Pages - How do I set the Color?

    In earlier versions of Safari, the user could select the color used to display links that have already been visited. I can't find that option in Preferences anymore. Some visited links do show a different color, some don't. Is it just random? How do I set the color in Safari 4.0.4 and activate the behavior?

    HI,
    I think you change visited pages link colors using Google preferences.
    http://www.googleguide.com/preferences.html
    Carolyn

  • Setting the color (or background color) of a substring

    Is it possible to set the color of a substring. For example:  If I had the string "Steve is stuck and needs help" and I wanted to change it to become "Steve is stuck and needs help".
    At present I am trying to modify the text inside of a String Indicator, but am open to suggestions.
    I have been reading the LV help and it seems to suggest that you can do this using the Text.SelStart and Text.SelEnd properties, but I can't get over that last hurdle that actually updates the string.
    Regards
    Steve
    https://decibel.ni.com/content/blogs/DailyCLAD
    Solved!
    Go to Solution.

    So close.
    Thanks All
    https://decibel.ni.com/content/blogs/DailyCLAD

  • Can I change the color of an image to a specific color code?

    Since I was unable to do this in Photoshop, I was wondering if there was a way in Flash to simply change the color of an image to a speciifc color code.  The image is more or less a simple line with rounded corners.  It is only composed of 1 color.  Does anyone know if it can be done with Flash?

    Shouldn't be a problem to do it in Photoshop or Flash. Since you couldn't do it in PS, I'm guessing that there is more to it than you are making obvious here.
    But in Flash you would import it, make it into a movieclip or graphic. Then apply a tint from the color effect portion of the properties panel.

  • Can you set the color of a specific element in a JList?

    Is it possible to set the color of a single element in a JList without writing lines and lines of your own class? I know setForgroundColor exists, it just changes all element in a JList, so is there a simple way to tweak it? i am still a newbie, so re-writing swing, would be a bit of a problem for me. Any Suggestions? thanks.

    you write your own renderer, about 6-8 lines, setting the color determined by an
    if/else statement - note: you must set the color in both if and else
    search the forums for
    "implements ListCellRenderer"
    and you should find plenty of examples
    if you just want the selected element a different color, you can do this with
    UIManager.put("List.selectionBackground", new javax.swing.plaf.ColorUIResource(Color.YELLOW));
    but you must do this before you create the JList, and it will affect all JLists in your program.

  • Changing the color of an image in EPS format using Illustrator

    How do I change the color of an image in EPS format using Illustrator? Once I do this how do I change the format of the image from EPS to something I can select onto a website like JPG, JPEG or PNG? I plan to print the image onto a T-shirt.

    start here:
    http://help.adobe.com/en_US/illustrator/cs/using/WS714a382cdf7d304e7e07d0100196cbc5f-6519a .html

  • Can u tell me how to set the color of the button and its border

    hi to all,can u tell me how to set the color of the button and its border

    There are sample code on the java.sun.com
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/index.html
    try this web page ... There are lots of examples... Good luck ... "Gan en "

  • Setting the color of a disabled checkbox...

    Hi,
    how do I set the color of a (disabled) JCheckBox because the following code does not work for me:
    jCheckBox1.setForeground(Color.BLACK);The background is that I don't want to have the checkbox in this grey (disabled) style, instead it should look like a "normal" checkbox (but disabled).
    Any ideas?
    Best regards
    - Stephan

    WindowsLookAndFeel uses native APIs to draw most of the controls. So, a disabled checkbox under Windows LAF will use the same API as the native disabled checkbox. You can install a custom JXLayer on that checkbox to prevent all the events from being passed to it - not the cleanest solution, but it will get you there (and make your users annoyed that they can't click on that checkbox).

  • Setting the color on selected Tab

    Hi,
    I can't seem to figure out how to set the color on the
    selected tab in a JTabbedPane. I've added a
    ChangeListener but when I try to use it, it only
    changes the color after the tab has been selected.
    I want to change it while it is selected.
    How can I do this?

    Maybe this helps:
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
    Kurta

Maybe you are looking for

  • Hardware Accelerated Video not working in 10.6.7

    Hi, I have had a problem with my 17" i7 Macbook Pro for a while now, and have been unable to find any information on it. When attempting to play H.264 videos, I get the following error messages in the Console: 30/04/2011 15:48:53 /Users/adnium/Deskto

  • How to attach files from other desk tops to my emails

    Can you please help me work out why I am not allowed to access files and folders on other users desktops on my imac? Thanks. Andrew

  • Combine Work Center Link Groups in one Work Center

    Hello Experts, our requirement is to combine the Work Center Link Groups of several Work Centers into one Custom Work Center. For example, the work centers Knowledge Management and Managing Operations. (IC-MGRKM, IC-MGRMA) They have Work Center Link

  • How to shift Negative sign from Right to left

    Hi friends, please tell me How to shift Negative sign from Right to left for quan data type i am getting on right side but i want to display it on left exactly preceding my output number display.

  • Back-up suggestions in mixed Mac Prol / G5 environment

    I've in the process of setting up a new Mac Pro to use along with a couple of G5s. I've been using SuperDuper to auto back up everything on a cloned 2nd drive in each tower. With the addition of the Mac Pro, I plan to update the G5s to Leopard and in