How to use a grayscale color model in converting a colored image

how to convert a colored image into grayscale using :
ColorSpace cs = ColorSpace.getInstance(ColorSpace.CS_GRAY);
int bits[] = new int[] {8};
ColorModel cm = new ComponentColorModel(cs, bits, false, false,
Transparency.OPAQUE,
DataBuffer.TYPE_BYTE);
please only this method , i don't need the "bandcombine" method cause i need to know that i have exact 256 grayscale colors, thanx in advance.

I went into mail preferences in the first place. I found the fonts and colors and picked the color I want but it doesn;t seem to be sticking?

Similar Messages

  • How to use Script in ADF model?

    Hi!
    I don't know how to use Script in ADF model. Help me, please!
    Detail: javaScript.
    Thanks so much!

    You can put your Javascript code in the Onmouseover property of the column.
    I don't have the Javascript code for changing the color but for example the following will pop up an alert
    <af:outputText value="#{row.DepartmentId}" onmouseover="alert(\'Unload event fired!\')">

  • How to use downloaded Adobe color theme (.ase) in Photoshop cc?

    How to use downloaded Adobe color theme (.ase) in Photoshop cc?

    I can confirm this functions but there is no indication it's been successful and the swatches appear in the Swatches panel, *not* in the Libraries panel where I would expect them.  My issue is that IMO this should not even be an issue, because a palette created on color.adobe.com should just show up in PS CC unless I'm not understanding the intended behavior.
    Anyone?

  • How to use IMAQ extract color panel in a LabView file?

    I want to change a color image into a greyscale image. Therefore I want to use the function IMAQ extract color panels but I don't know how to insert it in my LabView application.
    Please, can anyone give me some advice ?!!!
    Thx, Birgit

    Birgit,
    If you want all of the color planes, you can use IMAQ ExtractColorPlanes. Allocate an 8-bit image for each of the color planes. Wire the original color image and each of the 8-bit images for the color planes on the left and bottom of the vi. The outputs on the right side will be the same images, and they will each contain the desired color plane. The input at the top of the vi controls which color planes are extracted (RGB, HSI, etc.) Grayscale will probably be the I plane in HSI.
    If you just want a grayscale image, use IMAQ ExtractSingleColorPlane instead. Wire the color image to Image Src, and wire an 8-bit image to Image Dest. Select the color plane using the top input, and it will come out on the right side.
    Bruce
    Bruce Ammons
    Ammons Engineering

  • How to use UndoableEditSupport in undo model?

    The undo example of Java Tutorials just use UndoManager and UndoableEditListener. It didn't use the class UndoableSupport, How to use it?
    thanks for any replier.

    You can put your Javascript code in the Onmouseover property of the column.
    I don't have the Javascript code for changing the color but for example the following will pop up an alert
    <af:outputText value="#{row.DepartmentId}" onmouseover="alert(\'Unload event fired!\')">

  • How can i compare two color images in vision builder for AI?

    What i want to do is to compare two images. I have a base color image that represents the desired colors and tones. I have another image to be compared to the base image. What i want to do is to compare this two images to know how close they are regarding contents of color and tones. In other words, i want to know how close is image 2 to image 1 (base sample)....
    I would like to know how to get the content of certain colors in an image and then compare this values with the same values from another image.
    For example..i have two sheets of paper that contain various mixed colors...i want to know the amount of green, red an blue in each image and then comapre this values.
    What i want to do is to compare difer
    ent samples of fabrics. this fabrics must be of a specified color...but due to the process they may vary in tone or even color...so i want to compare this fabrics to a amster sample to see how close they are in color and tone..
    Anything would help since i dont have experience in this type of comparisons...thanks

    VBAI allows you to work with grayscale images only. You can acquire an image, use the vision assistant to convert it grayscale by extracting the luminance plane (or any of the other color planes) and then analyze the resulting grayscale image. To do what you are talking about, though, it would really be better to get Vision for labview. You could then take color images, compare color plains, use statistical functions to determine average color values, and so on.

  • How to import a spot color image in illustrator

    when importing a sport color tiff created in photoshop to illustrator the spot color image is not getting imported properly.

    kandasamy:
    PSDs will do nicely, and remain editable as well. Don't quite know what you mean by spot color TIFF as spots are not supported in this format.
    You should, however, be able to "paint" a grayscale tiff any spot you like in Illustrator.
    J

  • How to use an existing data model using Business Components in OEPE

    I am a beginner in ADF. I am working on a project with an existing data model that uses Business Components (EO, VO and AM). I know that OEPE does not handle the creation of BC, so if I want to modify them, I will have to do that in JDev. That's fine.
    OEPE can create pages with drag and drop like in JDev. In my eclipse ADF projects, I would like to use the existing BC, to be able to use the bindings with ADF Faces. So far I have nothing in the Data Controls tab.
    How to import the BC into the Data Controls tab?
    JDev 11.1.1.6
    WLS 10.3.6
    Eclipse Kepler

    We currently don't support DataControls based on the ADF BC technology. We will consider such support if there is a strong interest in that use case.
    Independent of the IDE's you use, there are ways to expose services based on ADF BC that can then be consumed by the view layer. A Google search will point you to some of the approaches.
    HTH. Thanks for your interest in OEPE.

  • [J2ME MIDP 2.0] Alert, how to use fonts and colors?

    good morning,
    does anyone know in which way I can use colors in an alert pop-up?
    I've done my on using the code below. I would like to have text and images centered in the screen display and I would also like to use the colors I'm using in the application I'm writing.
    thx in advice,
    Omar
    private void alertDisplay(String s){   
        Alert a = new Alert("Location set to " + s.toUpperCase());   
        if(s.startsWith("H"))
          a.setImage(hOn);
        else
          a.setImage(oOn); 
        a.setString("Actual Location: " + s.toUpperCase());
        a.setTimeout(2000);
        a.setType(AlertType.INFO);
        Display.getDisplay(this).setCurrent(a);
        Display.getDisplay(this).vibrate(1000);
        Display.getDisplay(this).flashBacklight(1000);
      }

    Hi,
    The way how an Alert looks like cannot be influenced. When setting an image, you cannot indicate where that image should be placed. When setting a certain message text, you cannot influence its colour, its font and its allignment...
    The colour and font properties are theme / skin dependent on your mobile. When switching your mobile to another theme, then you will notice that your Alerts (and Forms and Lists, etc etc...) are coloured (titlebar, command softkeys, textfields) according to that theme.
    Cheers,
    Jasper

  • How to use a certain color font in emails?

    How do you make the text used in emails a default color?

    I went into mail preferences in the first place. I found the fonts and colors and picked the color I want but it doesn;t seem to be sticking?

  • How to use filter to color cell content

    Numbers 3.5.2: I would like the content of a cell to change color, if the value of the number within the cell drops down below a certain value. For instance: as long as the values in the cell stay above 50 -> the number should be displayed black, if below 50 -> number should appear in red.
    This was possible in Numbers 09 using a simple filter as shown here:
    Did this filter disappear in actual Numbers? Is there any alternative?
    Thanks
    Ulrich

    What you are looking for isn't a "filter", its conditional text or conditional highlighting: http://help.apple.com/numbers/mac/3.5/#/tan93f5de5c3

  • How to use byte[] in EJB Model

    Hi Colleagues,
    I have problem with binding byte[] to model attribute.
    So I have methos myMethod(byte[] byteArr).
    byte[] in the model is represent as Byte_Item type.
    So I fill this attribute in this way:
    inputFile is of type byte[]
    for (byte b: inputFile) {
                IImportedFileElement el = wdContext.nodeImportedFile().createAndAddImportedFileElement();
                el.setItem(b);           
    Then when I'm executing model object Ireceive.
    java.lang.NullPointerException: while trying to invoke the method java.lang.Object.getClass() of an object loaded from local variable 'value'
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.setPropertiesForModelClass(EJBGenericModelClassExecutable.java:485)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.buildModelClassListFromCollection(EJBGenericModelClassExecutable.java:655)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.setPropertiesForModelClass(EJBGenericModelClassExecutable.java:553)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.fillReturnParameterToMc(EJBGenericModelClassExecutable.java:711)
    at com.sap.tc.webdynpro.model.ejb.model.EJBGenericModelClassExecutable.execute(EJBGenericModelClassExecutable.java:158)
    Could you help me with this problem.
    Best Regards,
    Dimitar

    You can put your Javascript code in the Onmouseover property of the column.
    I don't have the Javascript code for changing the color but for example the following will pop up an alert
    <af:outputText value="#{row.DepartmentId}" onmouseover="alert(\'Unload event fired!\')">

  • How to use dataprovider to color wedges of a piechart

    Hi!
    Is it possible to use a color provided by a dataprovider to
    color the correspoding wedges in a piechart?
    e.g.
    <answer>
    <text>room to improve</text>
    <bgcolor>#ff00ff</bgcolor>
    <results>5</results>
    </answer>
    I use 'text' for the legend, 'results' as value and I want to
    color the wedge with 'bgcolor'.
    I can not use CSS or fix values as the colors can vary every
    time...
    Any idea?

    Hi!
    Is it possible to use a color provided by a dataprovider to
    color the correspoding wedges in a piechart?
    e.g.
    <answer>
    <text>room to improve</text>
    <bgcolor>#ff00ff</bgcolor>
    <results>5</results>
    </answer>
    I use 'text' for the legend, 'results' as value and I want to
    color the wedge with 'bgcolor'.
    I can not use CSS or fix values as the colors can vary every
    time...
    Any idea?

  • How to use the character encoding model to use ' �'  in java

    hi
    I have to use the special characters like '�' using java.but when '�' character is transferred to data base or is displayed in my form,it is shown as '?'.but i need to display the original characters in the form of what it is.
    what can i do as i expects the result .i needs it very urgently.so reply to me as soon as possible.
    advance thank you
    rgds
    Oasisdeserts

    Java stores all characters as 16 bit UNICODE (which has plenty of room far more exotic characters than Greek). Every time character data is brought into, or stored from the Java environment it passes through a specific character encoding. If you don't state the encoding explicitly it uses the default encoding of the machine it's running on (which is typically oriented to the language set in the locale.).
    With a database the database driver is supposed to do any necessary translation. The non-latin character could be stored wrongly, the database could be returning it wrongly or whatever's creating your form could be interpretting it wrongly, or lack the capacity to display the character.
    If it's, say, a JSP try setting the page encoding to UTF-8. Try dumping the characters read from the database in HEX and look them up at www.unicode.org.
    Take a look at the database setup information, some have an option of storing characters as UNICODE or ASCII.
    The "?" is substituted whenever a codec can't make sense of the codes it's translating, either the byte array is invalid or the UNICODE character can't be represented.

  • How to use SharePoint Environment to save the text of an image in the DB?

    Hi All,
    I Don't know a lot about the SharePoint Environment, But I wanna that part who is talking about getting an image from a scanner, reading the text in it and save it as a text in the DB.
    Any one can help me about that? or give me a link to learn about what I need in it?
    Note: I'm using Oracle DB 10g.

    I had a few seconds I didnt think Id need again so I googled "connecting sharepoint to oracle" and got the following link for you which list steps how to connect sharepoint to oracle
    http://social.msdn.microsoft.com/Forums/en-US/sharepointcustomization/thread/8fa4ac8b-7e27-4b8f-ad12-f81d32ba7d2c

Maybe you are looking for

  • Acrobat reader hangs opening pdf created with autocad

    Hi all, when I try to open a pdf file created with autocad, Acrobat Reader hangs and I can't do anything else then kill the process. Now I use Acrobat Reader 9.5.5. I've insatlled also Acrobat Reader XI, but the problem persists. It seems it is very

  • Photo booth image size after lion upgrade

    While in Snow Leopard, whenever I take a photo using Photo Booth and drag and drop it onto an email message in a web browser, it pastes a smaller (approx 60-70kb) size of the image. With Lion, whenever I do this it pastes a bigger image (around 150-2

  • WCS 7.0.172.0 gui timeout

    Is there anyway to increase the timeout value for the gui? I have an intern positioning AP's on various map's and he gets booted off the gui at random times.  He isn't idle either. Thanks

  • Printing problem for Arabic language in Script..printing in reverse...

    Hi Experts,   I have a customized P.O script which is now to be made for arabic language.i have excel sheet with me which is translation of english to arabic, 1.  how can i proceed with the form in order to get exactly in arabic. 2. as arabic is read

  • GUI to open files on a network

    Hello I have a new project a hand. I want to make a GUI, which in its File menu will have an open button. Once this is clicked it will display files that are residing on another computer (on the same network). User will be able to open the files (mea