Retain color to foreground in binary image

hi
i need some help in the java.
I have binary image whose foreground is white nad background is black by the following code
BufferedImage image = ImageIO.read(new File("f:/123.JPG"));
BufferedImage bwImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
BufferedImage fgImage = //foreground image
new BufferedImage(bwImage.getWidth(),bwImage.getHeight(),
BufferedImage.TYPE_BINARY_IMAGE);
now i want to retain color to the foreground only..
can anyone help me..pleaseeeeeee

Here is my idea to display the pic on the webpage:
The pic is stored in DB as binary, after retrieving it, the binary data will be converted to JPEG pic. Then, the pic will be saved to the local machine automaticly. After that, I get the pic's SRC, and use html display it.
My code is as follow (not completed), some errors in it.     public static String getPayoffSRC(Services serv, long fileId)
                                                                throws FileNotFoundException,
                                                              DBException,
                                                              DbFileNotFoundException,
                                                          IOException {
        BufferedImage buffy = new BufferedImage(300, 400,
                                                    java.awt.image.BufferedImage.TYPE_INT_RGB);   
        FileOutputStream out = new FileOutputStream(serv.getFileManager().getFileDb(fileId).getFileName());
        JPEGImageEncoder jencoder = JPEGCodec.createJPEGEncoder(out);
        JPEGEncodeParam enParam = jencoder.getDefaultJPEGEncodeParam(buffy);
        enParam.setQuality(1.0F, true);
        jencoder.setJPEGEncodeParam(enParam);
        jencoder.encode(buffy);
        out.close();
        return Pic's SRC,
    }

Similar Messages

  • Extract foreground from binary image

    hi
    i need help in java programming in java.
    i have a binary image
    by the code
    BufferedImage image = ImageIO.read(new File("f:/123.JPG"));
    BufferedImage bwImage = new BufferedImage(image.getWidth(), image.getHeight(), BufferedImage.TYPE_BYTE_GRAY);
    //bwImage.createGraphics().drawImage(image, 0, 0, null);
    BufferedImage bwImage1 = new BufferedImage(bwImage.getWidth(), bwImage.getHeight(), BufferedImage.TYPE_BYTE_BINARY);
    //bwImage1.createGraphics().drawImage(image, 0, 0, null);
    i need only foreground in color..can u give me the code for that..its urgent..

    If you want any color whatsoever, then you need to use a BufferedImage type that supports color. BufferedImage.TYPE_BYTE_BINARY wont do. In the example below I use BufferedImage.TYPE_INT_RGB. The foreground remains in color, while everthing else turns white.
    BufferedImage image = ImageIO.read(...);
            BufferedImage fgImage =                     //foreground image
                    new BufferedImage(image.getWidth(),image.getHeight(),
                    BufferedImage.TYPE_INT_RGB);
            for(int x = 0; x < fgImage.getWidth(); x++) {
                for(int y = 0; y < fgImage.getHeight(); y++) {
                    int rgbSrc = image.getRGB(x, y);
                    if(rgbSrc == rgbForeground) {
                        fgImage.setRGB(x,y,rgbForeground); //remain in color
                    }else{
                        fgImage.setRGB(x,y,-1);  //set white
            }Or are you looking for more of a Sin City effect where one thing remains in color and everything else is in grayscale?
    BufferedImage image = ImageIO.read(...);
            BufferedImage fgImage =                     //foreground image
                    new BufferedImage(image.getWidth(),image.getHeight(),
                    BufferedImage.TYPE_INT_RGB);
            for(int x = 0; x < fgImage.getWidth(); x++) {
                for(int y = 0; y < fgImage.getHeight(); y++) {
                    int rgbSrc = image.getRGB(x, y);
                    if(rgbSrc == rgbForeground) {
                        fgImage.setRGB(x,y,rgbForeground); //remain in color
                    }else{
                        int r = (rgbSrc>>16)&0xff;
                        int g = (rgbSrc>> 8)&0xff;
                        int b = (rgbSrc    )&0xff;
                        int lum = (int) (.299 * r + .587 * g + .144 * b);
                        //set to grayscale
                        fgImage.setRGB(x,y,(255<<24)|(lum<<16)|(lum<<8)|lum);
            }

  • To retain color space value for Monochrome images during flattening.

    In our project, we are extracting image content from PDF file and doing some raster operation by using LeadTool and then flattening the processed image in PDF file.
    Input PDf file: One page which has monochrome image
    For extracting image content from PDF file, we are using below Acro Plugin API:
    AVConversionConvertFromPDFWithHandler
    After this, we will perform some raster operations by using LeadTool and then flattening will happen.
    While doing flatten we are performing below operations in sequence:
    1. Set bitspercomponent  =1.
    2. Create a new color table using DeviceRGB.
    3. Create image by using below Acro Plugin API:
    pdeimage = PDEImageCreate(&attrs, sizeof(attrs), &matrix, 0, cols1, NULL, &fil, asstm, NULL, 0);
    4. Add image in PDF content.
    Now flattening is successful, but monochrome(Original Image format) is changed to RGB. We want to retain the color space(DeviceGrey).
    We have tried the below solution to retain the color space:
    1. Using the old image's color space value for new image creation. But this gives inverted color(Black to White and vice versa)
    Please help us to retain the color space while flattening.

    We are using JPG file format.
    Please find below the code portions which we used to add image in PDF file,
    //Read Image Data
    ========================================================================================== ==================
    ASBool ret = TRUE;
    // analyze img
    ASInt32 index = 0, quadSize = 0;
    BITMAPFILEHEADER* bmfh = NULL;
    // BITMAPFILEHEADER
    if(  !bQuadSize )
      bmfh = (BITMAPFILEHEADER*)img;
      index += sizeof(BITMAPFILEHEADER);
    // BITMAPINFOHEADER
    BITMAPINFOHEADER* bmih = (BITMAPINFOHEADER*)(img+index);
    index += sizeof(BITMAPINFOHEADER);
    // RGBQUAD
    if( !bQuadSize )
      quadSize = bmfh->bfOffBits - sizeof(BITMAPFILEHEADER) - sizeof(BITMAPINFOHEADER);
    else
      quadSize = size -  bmih->biSize -  bmih->biSizeImage;
    ASInt32 rgbquadNum = 0;
    char* quad = NULL;
    if (quadSize > 0)
      rgbquadNum = quadSize/sizeof(RGBQUAD);
      quad = (char*)(img+index);
      index += quadSize;
    // Image
    //ULONG imgSize = size - bmfh->bfOffBits;
    char* image = (img+index);
    DURING
       if(!pd)
        E_RETURN(FALSE);
       PDPage pp = PDDocAcquirePage(pd, page-1); // Get Page(PDPage) of specified page number
       PDEContent pdeContent = PDPageAcquirePDEContent(pp, gExtensionID); // Get PageContent(PDEContent)
       ASInt32 numElems = PDEContentGetNumElems(pdeContent);  // Get PageContent num
       // Check BitMap width, height, biXPelsPerMeter, biYPelsPerMeter changed
       ASFixedRect mb;
       PDPageGetMediaBox(pp, &mb);
       ASFixedRect chgMediaBox;
       memset(&chgMediaBox, 0 , sizeof(ASFixedRect));
       if (paperSizeChangeType == PAPERSIZE_SIZESPECIFICATION)
        chgMediaBox.right = width;
        chgMediaBox.top = height;
       // Get PDEImage's Attributes & Filters & ColorSpace from Old Image in PDF file
    ========================================================================================== ===================================
       PDEElement pdeElement;
       ASInt32 importIndex;
       ASInt32 type;
       PDEImageAttrs attrs1;
       PDEColorSpace cols1;
       //ASAtom colname;
       PDEFilterArray fil1[20];
       ASInt32 filNum1;
       ASFixedMatrix matrix1;
       bool isTransformedPage = false; //EV2.8.02000_19651_Retain color space_20141016
       for (int i = 0; i < numElems; i++)
        pdeElement = PDEContentGetElem(pdeContent, i);
        PDEObject obj=_objHelper.TraversePDPageContentsImage((PDEObject)pdeElement);
         if(obj == NULL)
          continue;
         pdeElement= (PDEElement)obj;
        type = PDEObjectGetType((PDEObject)pdeElement);
        if (type == kPDEImage)
         // Get Attr
         PDEImageGetAttrs((PDEImage)pdeElement, &attrs1, sizeof(PDEImageAttrs));
         // Get ColorSpace
         cols1 = PDEImageGetColorSpace((PDEImage)pdeElement);
         // Get Filter Array
         filNum1 = PDEImageGetFilterArray((PDEImage)pdeElement, fil1);
         // Get ASFixedMatrix
         PDEElementGetMatrix(pdeElement, &matrix1);
         //EV2.8.02000_19651_Retain color space_20141016 - Start
         if (matrix1.a < 0 || matrix1.b < 0 ||
                        matrix1.c < 0 || matrix1.d < 0 ||
                        matrix1.h < 0 || matrix1.v < 0)
          isTransformedPage = true;
         //EV2.8.02000_19651_Retain color space_20141016 - End
         // Set Import and Delete Index
         importIndex = i;
         break;
       // Create image data (for PDEImage)
    ========================================================================================== =================================
       ASInt32 bitPerComponent = bmih->biBitCount;
       ASInt32 bitWidth = 0;
       ASInt32 width1 = bmih->biWidth;
       ASInt32 height1 = bmih->biHeight;
       // Create image size
       if (bitPerComponent == 1)
        if (width1%8)
         bitWidth = (width1/8) + 1;
        else
         bitWidth = width1/8;
       else if (bitPerComponent == 4)
        if (width1%2)
         bitWidth = (width1/2)+1;
        else
         bitWidth = width1/2;
       else if (bitPerComponent == 8)
        bitWidth = width1;
       else if (bitPerComponent == 32)
        bitWidth = width1*4;
       else // if (bitPerComponent == 24)
        bitWidth = width1*3;
       ASInt32 imgSize4Acrobat = height1 * bitWidth;
       char* image4Acrobat = (char*)ASmalloc(imgSize4Acrobat);
       if( image4Acrobat == NULL )
        E_RETURN(FALSE);
       memset(image4Acrobat, 0, imgSize4Acrobat);
       // Create image
       ASInt32 nokori = (bitWidth)%4;
       ASInt32 bitWidth4hokan = 0;
       if (nokori)
        bitWidth4hokan = bitWidth + (4-nokori);
       else
        bitWidth4hokan = bitWidth;
       ASInt32 hbw = 0;
       ASInt32 hbw4hokan = 0;
       if (bitPerComponent == 1)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         memcpy((image4Acrobat+hbw), (image+hbw4hokan), bitWidth);
       else if (bitPerComponent == 4)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         memcpy((image4Acrobat+hbw), (image+hbw4hokan), bitWidth);
       else if (bitPerComponent == 8)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         memcpy((image4Acrobat+hbw), (image+hbw4hokan), bitWidth);
       else if (bitPerComponent == 32)
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         for (int kk = 0; kk < bitWidth; kk += 4)
          *(image4Acrobat+hbw+kk) = *(image+hbw4hokan+(kk+3));
          *(image4Acrobat+hbw+kk+1) = *(image+hbw4hokan+(kk+2));
          *(image4Acrobat+hbw+kk+2) = *(image+hbw4hokan+(kk+1));
          *(image4Acrobat+hbw+kk+3) = *(image+hbw4hokan+(kk));
       else
        for (int k = height1-1, l = 0; k >= 0; k--, l++)
         hbw = l*bitWidth;
         hbw4hokan = k*bitWidth4hokan;
         for (int kk = 0; kk < bitWidth; kk += 3)
          *(image4Acrobat+hbw+kk) = *(image+hbw4hokan+(kk+2));
          *(image4Acrobat+hbw+kk+1) = *(image+hbw4hokan+(kk+1));
          *(image4Acrobat+hbw+kk+2) = *(image+hbw4hokan+(kk));
       //Invert Image Data
    ========================================================================================== ================================
       for(int it = 0; it < imgSize4Acrobat; it++)
          image4Acrobat[it] = 255 -image4Acrobat[it];
       // Open Image Data
    ========================================================================================== ================================
       ASStm asstm = ASMemStmRdOpen(image4Acrobat, imgSize4Acrobat);  
       // Create PDEImage Attribute etc.
    ========================================================================================== ================================
       PDEImageAttrs attrs;
       memset(&attrs, 0, sizeof(PDEImageAttrs)); // necessary
       attrs.width = width1;
       attrs.height = height1;
       if (bitPerComponent == 1) {
        attrs.bitsPerComponent = 1;
        if (rgbquadNum) {
         attrs.flags = kPDEImageIsIndexed | kPDEImageExternal; // Indicates image uses an indexed color space.
        } else {
         attrs.flags = kPDEImageExternal; // Indicates image is an XObject.
         // B&W
       } else if (bitPerComponent == 4) {
        attrs.bitsPerComponent = 4;
        if (rgbquadNum) {
         attrs.flags = kPDEImageIsIndexed | kPDEImageExternal; // Indicates image uses an indexed color space.
        } else {
         attrs.flags = kPDEImageExternal; // Indicates image is an XObject.
       } else if (bitPerComponent == 8) {
        attrs.bitsPerComponent = 8;
        if (rgbquadNum) {
         attrs.flags = kPDEImageIsIndexed | kPDEImageExternal; // Indicates image uses an indexed color space.
        } else {
         attrs.flags = kPDEImageExternal; // Indicates image is an XObject.
       } else if (bitPerComponent == 32) {
        // not support (acrobat)
       } else { // (bitPerComponent == 24)
        attrs.flags = kPDEImageExternal;  // Indicates image is an XObject.
        attrs.bitsPerComponent = 8;
       // matrix
       ASFixedMatrix matrix;
       memcpy(&matrix, &matrix1, sizeof(matrix1));
       if (paperSizeChangeType == PAPERSIZE_SIZESPECIFICATION)
        matrix.a = chgMediaBox.right;
        matrix.b = 0;
        matrix.c = 0;
        matrix.d = chgMediaBox.top;
        matrix.h = 0;
        matrix.v = 0;
       // Filter
       PDEFilterArray fil;
       memset (&fil, 0, sizeof (PDEFilterArray));
       PDEFilterSpec spec;
       memset (&spec, 0, sizeof (PDEFilterSpec));
       memcpy(&fil, &fil1, sizeof(PDEFilterArray));
       CosDoc cosDoc;
       CosObj cosDict;
       // Build the CosObj for the filter specification
       cosDoc = PDDocGetCosDoc(pd);
       cosDict = CosNewDict(cosDoc, false, 2);
       CosDictPut(cosDict, ASAtomFromString("K"), CosNewInteger (cosDoc, false, -1));
       CosDictPut(cosDict, ASAtomFromString("Columns"), CosNewInteger (cosDoc, false, width1));
       //memset the filterspec so there are no garbage values if we leave members empty
       spec.encodeParms = cosDict;
       spec.decodeParms = cosDict;
       spec.name = ASAtomFromString("CCITTFaxDecode"); 
       fil.spec[0] = spec;
       // Create PDEImage
    ========================================================================================== =================================
       PDEImage pdeimage;
       pdeimage = PDEImageCreate(&attrs, sizeof(attrs), &matrix, 0, cols1, NULL, &fil, asstm, NULL, 0);
       // Delete PDEImage at importIndex(==j) of page -> Delete old image in PDF file
    ========================================================================================== ====================
       PDEContentRemoveElem(pdeContent, importIndex);
       // Add PDEImage
    ========================================================================================== ==========================
       PDEContentAddElem(pdeContent, importIndex, (PDEElement)pdeimage);
       PDPageSetPDEContent (pp, gExtensionID);
       PDPageReleasePDEContent(pp, gExtensionID);
       // Release object
       PDERelease((PDEObject)pdeimage);
       PDPageNotifyContentsDidChangeEx(pp, TRUE);
       PDPageRelease(pp);
       ASStmClose(asstm);
       if (image4Acrobat)
        ASfree(image4Acrobat);
       if (lookupTable)
        ASfree(lookupTable);
      HANDLER
       ret = FALSE;
      END_HANDLER
    return ret;

  • How to fix gray background on images without checking "retain color depth"

    I have a cover page on my report where the user can insert a logo image. The problem is that if the logo image has a white background it will turn the white background gray. I have figured out how to resolve this by checking "retain original image color depth.u201D The problem with this is that all the images in my report are larger so the report pdf file size goes from 3mb to 30mb. Is there a way to make the logo image appear as normal without having to check the retain color depth? I have tried adjusting the image in photoshop several different ways but havenu2019t figured it out yet.

    That is exactly why the option is there. And why it is unchecked. Most people prefer to have smaller report size. The choice is small reports with the option unchecked and the loss of picture quality, or bigger reports with the option checked, retaining the picture quality. THis a by design and is not consiered to be a "bug". If you post the issue into the [idea place|https://ideas.sap.com/community/products_and_solutions/crystalreports] perhaps it will get picked up as an enhancement, but that it the best I can suggest.
    - Ludek
    Edited by: Ludek Uher on Jun 17, 2011 6:29 AM

  • Binary image to color jpeg

    I am manipulating (B/W) ICCD images with Vision.  Unfortunately, I have to cut the images down to I8, but that is not the issue.  My question is this-  Labview allows me to visualize the I8 data with a "rainbow" color map.  I would like to get it to automatically create a color JPEG file (or other image file type) that I can open in powerpoint.  I am aware of the IMAQ write file2.vi, but that only writes a grayscale file.  How do I go about interpreting the I8 values to color data?  Sorry, I am a newbie to image manipulation.  J

    Use something like this.  Fill in the array constant with the colors that you want.
    Attachments:
    Raw_data_to_Jpg.vi ‏14 KB

  • PSE 8 coloring a black and white image

    Okay, so I downloaded a free trial of PSE 8, so my experience with it is limited, which may contribute to my problem. I've watched tutorials on how to add color to a black and white photo using the paintbrush tool, though I haven't watched one for PSE 8.
    I'll make a new layer, paint part of the picture, and then add another layer. But when I click a different color to paint with, it changes the color of what I already painted, even though I'm on a different layer.
    Also when I tried to just save the image with one part painted, it didn't save it, and the image looked as it did originally.
    Any help is appreciated! Thanks!

    Hi,
    Are you using the right tool to paint on a layer?
    For coloring a black and white image, you need to save different areas of your image on a different layer and then use either Paint brush or a Paint bucket tool.
    It seems that you are selecting a wrong tool. For selecting Brush, press B.
    Then try painting on one part of the image and then go to the the color swatch present at the end of the tools panel on the left as :
    Now click on the foreground color swatch(on the top) to change the color with which you want to paint.This will not change the color of other layers on changing the color.
    Cheers
    Swarnima

  • Setting the fg/bg color of a 1 bit image

    Is there a simple way to set the foreground and background colors of a one bit image? What I need to do is draw a bitmap on a Canvas component where all black pixels in the loaded (gif) Image paint as my custom foreground color and all white pixels paint as my custom background color. I'm thinking maybe something like drawing a filled rectangle using the bitmap as a mask?? I am porting code from Windows, and this is something that is kind of built in to MFC.
    Currently I have this working in Windows running Java 1.4.0, but it wont work on a Macintosh running Java 1.1 (or 1.2?). I'm wondering if I stumbled upon a quirk that only works in Windows?
    This is the code from my Canvas object paint() method:
    g.drawImage(bitmapUp, 0, 0, getForeground(), this);
    g.setXORMode(getForeground());
    g.drawImage(bitmapUp, 0, 0, getBackground(), this);
    'bitmapUp' is a one color gif image with transparency. Basically anything that is not transparent gets filled with my foreground color. It seems like this is not the best way to go about things (even if it worked on all platforms).
    Test it here if you want:
    http://www.wizardmaster.com/test/muzakaster/
    - Thanks, Markus P.Spanglestein

    import java.awt.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import javax.swing.*;
    public class TwoTone {
         static final int SIZE = 200;
         static BufferedImage image = new BufferedImage(SIZE,SIZE,
                   BufferedImage.TYPE_BYTE_BINARY); //Black&White
         public static void main(String[] args) {
              JFrame f = new JFrame("TwoTone");
              f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              Graphics2D g2 = image.createGraphics();
              g2.setPaint(Color.WHITE);
              g2.setStroke(new BasicStroke(6f));
              g2.draw(new Ellipse2D.Float(0,0,SIZE, SIZE));
              g2.dispose();
              final JLabel label = new JLabel(new ImageIcon(image));
              label.addMouseListener(new MouseAdapter(){
                   public void mousePressed(MouseEvent evt) {
                        IndexColorModel icm = (IndexColorModel) image.getColorModel();
                        int[] rgbs = new int[2];
                        icm.getRGBs(rgbs);
                        Color c0 = JColorChooser.showDialog(label,
                             "Choose background", new Color(rgbs[0]));
                        Color c1 = JColorChooser.showDialog(label,
                             "Choose foreground", new Color(rgbs[1]));
                        rgbs[0] = c0.getRGB();
                        rgbs[1] = c1.getRGB();
                        icm = new IndexColorModel(1, 2, rgbs, 0, false, -1, DataBuffer.TYPE_BYTE);
                        image = new BufferedImage(icm, image.getRaster(), false, null);
                        label.setIcon(new ImageIcon(image));
              f.getContentPane().add(label);
              f.pack();
              f.show();
    }

  • Binary image

    I want to convert a image to a binary image(only black& white)
    I use this code to convert a color image to a grayscale image:
    public static BufferedImage applyGrayscaleFilter(BufferedImage aImage)
    BufferedImage tmpBufImage = aImage;
    try
    for (int i = 0; i < aImage.getWidth(); i++) {
    for (int j = 0; j < aImage.getHeight(); j++) {
    Color c = new Color(aImage.getRGB(i, j));
    int r = c.getRed();
    int g = c.getGreen();
    int b = c.getBlue();
    //formula for grayscale
    int gray = (int) (0.2989 * r + 0.5870 * g + 0.1140 * b);
    c = new Color(gray, gray, gray);
    tmpBufImage.setRGB(i, j, c.getRGB());
    catch(Exception ex)
    return null;
    return tmpBufImage;
    I need help for convertin this image(grayscale) to binary image (b&w - only 1 and 0).

    No need to do it yourself, BufferedImage will do it for you:
    Image oldImage= ...;
    BufferedImage newImage=new BufferedImage(oldImage.getWidth(null),
        oldImage.getHeight(null), BufferedImage.TYPE_BYTE_BINARY);
    newImage.getGraphics().drawImage(image, 0, 0, null);

  • How to export binary images

    I am a neuroscientist developing a brain atlas and am using illustrator to produce the images needed.
    Basically I need to open up an .ai file that contains the brain image. I need to fill that with black, remove parts of it
    (haven't figured out how to do that yet) and export it at a specific location within the canvas and make the canvas a specific size.
    I need to export that as a .jpeg or .gif with only 2 colors. I then need to repeat this process 700 times.
    Is there a way to remove a part of an image quickly?
    Is there any way to export with only 2 colors? (binary image)
    Any ideas would be greatly appriciated.

    1- The images are in vector format
    2- I am using version 14 but will be using version 15 when my lab gets it.
    3- I don't have photoshop, though I have used it and fireworks a long time ago
    4-
    http://books.google.ca/books?id=0prYfdDbh58C&printsec=frontcover&dq=paxinos+watson&source= bl&ots=-5jsGV_LAk&sig=fV18n7RLuPTgv9Y7rpHJ93cyi2I&hl=en&ei=ttcGTIrvCoW0lQeh0Yi-Cg&sa=X&oi= book_result&ct=result&resnum=4&ved=0CCkQ6AEwAw#v=onepage&q&f=false
    or try brainmaps.org
    A brain atlas is an atlas of the brain. In my case a rat brain. Not much different than an atlas you would be familiar with. It contains images and coordinates showing where areas and structures are. Since the brain is 3D a brain atlas is also in 3D. It is usually organized by having slices (think loaf of bread) placed one after another on separate pages of a book. We get the pictures in the atlas by staining the brain with chemicals that make it change colors. Then we cut it into sections on a braincutting machine and put it on a microscope slide to take a picture.
    In our lab we use electrodes to listen in on what brain cells are doing. This brain atlas will allow us to show where our electrode tips were in the brain and what areas we were targeting. It is mainly for presentations and teaching.
    I will be using illustrator to produce binary images of the essential stuff in exactly the right places. Once I have those I have some computer code that will stack those images together to make a 3D brain.
    My biggest problem is exporting with only 2 colors in the entire image. I should be able to use my programming knowledge to take care of everything else.
    I have never used any graphic vector software before so any help I can get is greatly appreciated.

  • Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe acco

    Hey, How do I populate my replace colors color library in illustrator? I tried to replace color on a traced/ vectorized image and when I selected and went to the color library CC said I need to use a valid username. I was already logged into my adobe account.

    Can you please show a screenshot of what exactly you want to replace where?

  • How to display a binary image in a webpage?

    Hi,
    I want to display a binary image in a webage. The image has been stored in a DB as binary format. I am using servlet. How could I retrieve it and display it on a webpage? Could you give me some suggestions?
    I have read some metrial about JAI, the method 'createImageEncoder( )', which seems very helpful! I am on the right way, right? Thanks for your any comments!
    Best Regards,
    Hai

    Here is my idea to display the pic on the webpage:
    The pic is stored in DB as binary, after retrieving it, the binary data will be converted to JPEG pic. Then, the pic will be saved to the local machine automaticly. After that, I get the pic's SRC, and use html display it.
    My code is as follow (not completed), some errors in it.     public static String getPayoffSRC(Services serv, long fileId)
                                                                    throws FileNotFoundException,
                                                                  DBException,
                                                                  DbFileNotFoundException,
                                                              IOException {
            BufferedImage buffy = new BufferedImage(300, 400,
                                                        java.awt.image.BufferedImage.TYPE_INT_RGB);   
            FileOutputStream out = new FileOutputStream(serv.getFileManager().getFileDb(fileId).getFileName());
            JPEGImageEncoder jencoder = JPEGCodec.createJPEGEncoder(out);
            JPEGEncodeParam enParam = jencoder.getDefaultJPEGEncodeParam(buffy);
            enParam.setQuality(1.0F, true);
            jencoder.setJPEGEncodeParam(enParam);
            jencoder.encode(buffy);
            out.close();
            return Pic's SRC,
        }

  • In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    In Preview, I suddenly am unable to get the "Adjust Color" tool panel to edit images. I just get the rectangular image selection tool instead. How do I ge the "Adjust Color" tool panel back?

    Hmmm, I wonder if that window is hidden or off screen? Have you moved the pic window around to look under it?
    Might try this...
    Safe Boot , (holding Shift key down at bootup), use Disk Utility from there to Repair Permissions.
    Then move these files to the Desktop for now...
    /Users/YourUserName/Library/Preferences/com.apple.finder.plist
    /Users/YourUserName/Library/Preferences/com.apple.systempreferences.plist
    /Users/YourUserName/Library/Preferences/com.apple.desktop.plist
    /Users/YourUserName/Library/Preferences/com.apple.recentitems.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.plist
    /Users/YourUserName/Library/Preferences/com.apple.Preview.bookmarks.plist
    Reboot & test.
    PS. Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.

  • Adjusting color in part of an image in a photo.

    Hi, just bought Photoshop CC and am stuck.  I just received a photo of my uncle that was taken through the glass of the frame it was in.  The right side of his face is lighter than the rest of his face.  How do I adjust this color? You can also see some lightening of the lower right portion of his hat. Other issues have been corrected.  Portion of photo attached.  Thanks.

    Thank you so much.  I will give it a shot. Your help is greatly appreciated.  Will let you know how it works.
          From: musarticus <[email protected]>
    To: Gary Fletcher <[email protected]>
    Sent: Saturday, January 31, 2015 8:42 PM
    Subject:  Adjusting color in part of an image in a photo.
    Adjusting color in part of an image in a photo.
    created by musarticus in Photoshop for Beginners - View the full discussionTry this:  1) Duplicate your layer (Command/Control + J)2) Add a mask to the new duplicate layer3) Select the mask and either paint the left side black with your brush tool, or use the gradient tool for a black-to-white gradient4) Change the blend mode on the duplicate layer to "Multiply"5) If you want to go darker, duplicate the layer a second time and adjust the opacity as desired.6) In the image below I also masked out the background and added an orange photo filter to warm up the right side of the face. I cranked the filter to better see it, but you can reduce it to taste.7) There are other things you could try like painting with your brush in "Color" mode to fine-tune skin tones, or use the dodge and burn tools, etc.  https://forums.adobe.com/servlet/JiveServlet/downloadImage/2-7149917-723260/Multiply.png  If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7149917#7149917 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7149917#7149917 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Photoshop for Beginners by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • PDF binary image display on smartforms?

    Hi guys,
    I'm very new to this but i hope i can explain it correctly.
    Lets say right now l have some pdf stored in SAP(Service Contract for example) and we're reading them as binary image files right?
    Is it possible to retrieve such binary image and display them in an existing smartform?
    I hope i'm explaining the right way...this has something to do with DMS ??
    Below are some codes to further help in my questions.
    ALL FUNCTION 'SCMS_UPLOAD'
        EXPORTING
          filename       =  '/usr/sap/XXXX/XXXXXX/test.pdf'
          binary         = 'X'
          frontend       = ' '
    *   MIMETYPE       =
        IMPORTING
          filesize       = size
        TABLES
          data           = file_data
    * EXCEPTIONS
    *   ERROR          = 1
    *   OTHERS         = 2
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DATA: BEGIN OF content_bin OCCURS 1,
              line TYPE SDOK_SDATX,
            END   OF content_bin.
      DATA: BEGIN OF content_txt OCCURS 1,
              line TYPE sdokcntasc,
            END   OF content_txt.
      CALL FUNCTION 'SCMS_DOC_READ'
        EXPORTING
          mandt                       = sy-mandt
          stor_cat                    = ' '
          crep_id                     = crep_id
          doc_id                      = doc_id
        TABLES
    *   ACCESS_INFO                 =
          content_txt                 = content_txt
          content_bin                 = content_bin
    * EXCEPTIONS
    *   BAD_STORAGE_TYPE            = 1
    *   BAD_REQUEST                 = 2
    *   UNAUTHORIZED                = 3
    *   COMP_NOT_FOUND              = 4
    *   NOT_FOUND                   = 5
    *   FORBIDDEN                   = 6
    *   CONFLICT                    = 7
    *   INTERNAL_SERVER_ERROR       = 8
    *   ERROR_HTTP                  = 9
    *   ERROR_SIGNATURE             = 10
    *   ERROR_CONFIG                = 11
    *   ERROR_FORMAT                = 12
    *   ERROR_PARAMETER             = 13
    *   ERROR                       = 14
    *   OTHERS                      = 15
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

    Anyone? Please its kinda urgent.
    Basically, If I understand correctly, what I have now is are converted binary data from the PDF document?
    Is there a way to take these data and displaying it meaningfully(may be through some other processes like conversion again) in a smartform? Is this possible?

  • Can we load generic binary image in Oracle spatial database

    hi i am new to this topic. so kindly help me out.
    can we store generic binary image in Oracle 10g spatial database?
    generic i mean there is no header information.

    hi everybody,
    thanks in advance. i am in little bit confusion. actually i am new to oracle 10g spatial db concept and image processing. i have to decide whether to store DEM & ORTHO image in Oracle 10g spatial database. or using BLOB to store these images. i have to design physical as well as logical database to store both above mentioned images.
    i don't have much knowledge about DEM & ORTHO image.
    i don't know what to do. even though i have started some of the Oracle 10g spatial concepts. i would like to know can i also use oracle intermedia for storing these images (ORTHO & DEM images).
    looking for help
    thanks
    Ajay

Maybe you are looking for

  • VMWare Fusion vs. Parallels Desktop for Mac + Captivate?

    I'm likely to purchase a new MacBook Pro in the very near future, and wish to run Captivate on it. I've seen a few posts in this forum by folks using VMWare Fusion with mixed results. The posts are a couple of years old, so I'm curious to get the lat

  • Can I restore to factory settings from within windows?

    I have an NB205-330 with Windows 7. I installed Ubuntu Netbook Remix and Grub became my bootloader. Having 2 OS's wasn't as fun as I thought it would be so I'd like to return to just having windows. If I delete the Ubuntu partition Grub still tries t

  • Flex 4 - Can not get ADG working

    Hello, I have just downloaded flex 4 SDK (flex_sdk_4.0.0.14159_mpl) and Flash Builder 4. I have created a test prroject and can not get it working with Advanced Data Grids. Here is my set up:  Created Project called Test, this contains one MXML file

  • Shipping point - Inbound delivery

    Hi gurus, Which shipping point do we use in return delivery ? Can we keep the same shipping point for both outbound delivery & inbound delivery. If we maintain different shipping point for return delivery then what is the shipping point determination

  • Result of prerequisite check cannot be analysed -SOLMAN_SETUP

    We are on solution manager EHP1 SP 19 and when we run Diagnostics prerequisites via SOLMAN_SETUP,following error is displayed "result of prerequisite check cannot be analysed" .Display shows no information.Kindly help. Note : SAP note :1309758 has al