Color Space on Thumbnail Image Variants

Hi all-
I'm loading some CMYK images into my repository (5.5 SP05) and trying to use the default thumbnail variant in a web application. For some reason, even though the color space of the thumbnail is set to RGB, it doesn't get converted when the thumbnail is created. This results in a .jpg  that is CMYK (and isn't understood by a browser).
If I create a custom variant as .jpg and of the RGB color space, it works fine after generation. Is this a bug? Or is there a way to force the generation of thumbnails? I was trying to not have too many variants in my repository because I was worried about bloating it. Perhaps this shouldn't be a concern, but it still seems as if the thumbnail should get converted to RGB according to the settings in the Console. Any thoughts?
Thanks
Tim

Tim,
Sounds like this may be a bug. Since the Thumbnails are set to RGB, and cannot be changed, it seems as though they should be generated in RGB color space.
One thing to try. Go into the images table, right click on an image in the records window, and select Generate Thumbnail. I believe it will actually regenerate the thumbnail. Maybe this will regenerate with the RGB color space. That's my only idea. Other than that you really don't have much control over the thumbnails.
Regards,
Tim

Similar Messages

  • How to set color space to JPEG image with Java advance Imaging

    How to set color space to JPEG image with Java advance Imaging.
    is there any API in JAI which support to set color space.

    I'm definately no guru, but this is how you can change it.
    CTRL + ALT + Click on the part of the component that you want to change. This brings up the Hidden Dom Inspector, background of component will be surrounded with a red outline (Make sure the red outline is surrounding the part of the tabset you want to change), Now you go to properties sheet and click the ellipses next to rules property this will pop up a dialog you look in this list (At the top) to see the default style classes that are affecting the rendering of the component outlined in red. (You will be able to select different sections of a single component) then you just rewrite the style class that you want to change in your Stylesheet (You will not find the styleclass that you want to change because it is a part of your theme .jar but as long as you name it exactly the same and place in your stylesheet it will override the theme .jar style classes) it's actually very easy -- you were right should be a piece of cake for a guru. Don't have the link handy but you can check out Winston's Blog on changing Table Formatting to get this information...It is EXTREMELY useful if you want your apps to have a custom look and not default that comes with Creator Themes.
    Hope this helps you out God knows others have helped me alot!
    Jason

  • Deriving color space of an image from a byte array input stream.

    I was wondering, is it possible to derive the color space of an image, i.e. RGB, YCC, GRAY by calculating its bytes?

    Calculate bytes just means doing operations on the
    byte values. That's how I got the height and width of
    the image. Now, I'm wondering if it is possible for
    the color space.Look at the format specifications...
    By the way, do all image file types have different
    color space or could they all have the same color
    space, for example, RGB?They can have different color spaces. RGB, ARGB, CMYK, some Adobe format...

  • Match color space when opening image in photoshop

    hi, i have new macbook air and when i export image from lightroom as TIFF (pro photo RGB) and import to photoshop, it asks what to do that embedded color space does not match with settings, therefore i changed that in photoshop (edit/color settings to pro photo rGB ), however my question is:  if there is any problem because my notebook display is set (system preferences) to "color LCD"
    when i set my display as pro photo RGB, it base blue tone, i must use Apple's preset called "colour LCD"

    Good day!
    if there is any problem because my notebook display is set (system preferences) to "color LCD"
    Your screen profile should generally not be set to your RGB Working Space as this would kind of negate Color Management.
    And in the absence of a proper custom profile the maker’s default profile seems to be a valid choice.
    Regards,
    Pfaffenbichler

  • Color Space info for images

    Hi all,
    I would like to show the color space details for an image. Do you know what field mapping is required?
    Thanks,
    A.

    >> images are still a bit washed out with a warmish/ yellow cast to them, particularly, my black and white images
    Here is a simple test to help evaluate if the monitor profile is reasonably good:
    Open a RGB file in Photoshop (flatten if not already flattened).
    Press M key> Drag a selection> Com+Shift+U (Desaturate).
    Com+Z (to toggle back and forth).
    If the unsaturated selection looks neutral you've got a reasonably fair monitor profile.
    If selection has color casts (not neutral) -- you have a bad monitor profile
    +++++
    Here is a simple test to help evaluate if a bad monitor profile is whacking out your Photoshop color:
    Monitors/Displays (control panel)> Color> highlight AppleRGB or sRGB (don't run Calibrate), quit and reboot.
    If the Photoshop colors are back under control, then the problem was most surely a bad monitor profile go back into Monitors/Displays> Color and Calibrate a good profile highlight (load) sRGB, or preferably, the monitor's OEM profile as a starting point.
    If you are using a puck, it is likely defective; or your monitor hardware is the culprit...search it on Google by model number

  • Problem with possible conflicting color spaces between BG image and blend color

    Hello,
    Occasionally I will get a PDF file from an outside source. The usual routine is to run it thru Preflight using Acrobat 8 Professional.
    I run it thru "digital printing black and white" and "compatibility with Acrobat 5" because I use Quart 6.5 as a layout program and cannot go any higher with compatibility.
    I have a grayscale image on the PDF that gets a lighter box area on the file where the image touches another element. I think it may have something to do with transparency, but not really sure. It seems the element touching it may be in front of the problem photo, and if the element is not a straight line, that is when the light spot on the image below obviously shows.
    Anyone know how to deal with this issue?
    Thank you,
    Nancy

    Steve -
    Yup, same problem, thanx for the link. ++
    Yes, it's off between 5 and 10. I have been adjusting by trial and error as I didn't think about the DigitalColor Meter. Used to use some hack like that back in Mac OS 8 or so, don't think I've ever used it in OS X. Lurn something new every day or two.
    Still got some fringes on the overlay edges and in general it's not acceptable. If it didn't happen in DVDSP 2 then it's definitely a bug. Oh, well, I'll dazzle 'em with my footwork.
    Thanx to all for the tips,
    Russ

  • Color spaces in AWT and JAI

    Hi,
    I am trying to build a image editing application that
    supports color management. I am using Swing, AWT, and
    JAI 1.1.2. Unfortunately, the most recent tutorial I
    could find is about JAI 1.0.1, and a bit outdated.
    Does anybody know where I can find a newer tutorial?
    The problem I'm having is related to color spaces.
    I would like the user to select from a variety of
    color spaces like Adobe RGB, Bruce RGB, etc., etc.
    These spaces are not supported by default, so it
    seems, and I couldn't find a way to define them
    myself. Of course I want the TIFF/JPEG readers and
    writers to be able to recognize these spaces if their
    profiles are embedded, and to include these profiles
    when writing images.
    Any help or references?
    Thanks!
    Job Honig

    Well, I have the same problem, sort of.
    You can get the jpeg profile from the EXIF information of the file (http://www.drewnoakes.com/code/exif/) so you at least know what is coming in. This will work for jpeg, not for tiff (I think).
    However, I didn't manage to find a way to create a buffered image for the right profile. You can create it as a default, which is sRGB, or as CS_LINEAR_RGB etc, but did not managed to get a straight correlation between the color space of the image and the ICC profile of the input.
    Than, I tried to use ColorConvertOp to convert from the input space to the output space, by using
    ColorConvertOp convert = new ColorConvertOp (srcCspace, dstCspace, new RenderingHints( RenderingHints.KEY_COLOR_RENDERING , RenderingHints.VALUE_COLOR_RENDER_QUALITY));
    But somehow the results when printed do not look correct.
    Didn't manage to find any good example on how to take in one space (like ADOBE RGB 1998) and put it in a PDF file so it will print in the exact color space (either directly, or by converting it to XYZ, whatever).
    Anyway, if you have any success here, I'll be happy to know...
    -Yishai

  • Image in PDF error - Expected end of color space

    Hi friends,
    I am displaying a PDF file in an webdynpro application. The contents are coming from the output of a RFC. The pdf file contains an image. While I am running the Webdynpro application the image is not coming. An error popup <b>"Expected end of color space"</b> is generated. But the texts of pdf file is coming properly.
    Please help.
    With regards,
    Sekhar

    Hi Sekar
    We are facing the same issue.  Have you managed to resolve this issue ?
    Please advise
    Regards
    Vivek

  • Converting RGB images (sRGB or Adobe RGB) to 709 color space.

    I'm trying to determine the correct way to convert RGB images (sRGB or Adobe RGB) to 709 color space.  I can't just use the "covert to profile" function to do this because it does not produce results that fall within the 16 to 235 range that 709 dictates.  I've read that you can simply use the "Levels" adjustment and change the output levels to 16 to 235.  While this would clearly compress the luminance to the correct range, I'm not entirely clear if the end result would be a proper conversion (i.e. if color and gamma, for example, would be technically correct.)
    I noticed that converting the profile to "HDTV (Rec. 709)" does alter the image, so I'm wondering what the result would be if I did both this AND used the levels control to compress the output range to 16 to 235.
    Thanks for any feedback on this.

    (1)
    http://en.wikipedia.org/wiki/Rec._709
    (2)
    http://en.wikipedia.org/wiki/Rec._601
    The transfer functions for Rec.709 (1) refer to the range [0..1] or for 8 bits per pixel [0...255].
    It seems that the clipping, black=16 and white=235 has to happen after the application of the
    transfer function. If this should be true, then we don't have a level compression but a level
    clipping at both ends, as already for Rec.601 (2), like here:
    The ICC-Profile HDTV(Rec.709) in Photoshop contains the primaries and the white point
    (both like that in sRGB) and the transfer functions for [0..1], coded by a LUT with high resolution,
    as found by Profile Inspector. There is no clipping.
    By the way, that`s the internal profile name, I don't know the file name of the profile.
    Softproofing, source in sRGB, target HDTV(Rec.709), without clipping:
    With numbers not preserved: no change of the appearance, as expected.
    With numbers preserved: shows the effect of different effective gammas. 
    Your questions are very clear and I'm not sure whether my comments help. The information
    in the internet is not convincing.
    Best regards --Gernot Hoffmann

  • Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution)   Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV

    Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution)   Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV

    You're welcome, and thank you for the reply.
    2) Yesterday I made the subclips with the In-Out Points and Command-U, the benefit is that I've seen the clip before naming it. Now I'm using markers, it's benefit is that I can write comment and (the later) clip name at once, the drawback is that I have to view to the next shot's beginning before knowing what the shot contains.
    But now I found out that I can reconnect my clips independently to the format I converted the master clip to. I reconnected the media to the original AVI file and it worked, too! The more I work with, the more I'm sold on it... - although it doesn't seem to be able to read and use the date information within the DV AVI.
    1) Ok, I tried something similar within FCE. Just worked, but the file size still remains. Which codec settings should I use? Is the export to DV in MOV with a quality of 75% acceptable for both file size and quality? Or would be encoding as H.264 with best quality an option for archiving, knowing that I have to convert it back to DV if I (maybe) wan't to use it for editing later? Or anything else?
    Thank's in advance again,
    André

  • How do I save images into an sRGB color space?

    Hello,
    I'm trying to do this to a batch of images.  I'm not up to writing scripts.
    But I can't even convert one RAW image to an sRGB color space.
    Any thoughts?
    Much appreciated!
    Matt

    There's a link at the bottom-center of the Camera Raw dialog.  Click it and you'll be able to set the color space for output of the conversions.
    -Noel

  • How to set PS for the most reliable image previews and how to make sure the color spaces are the same across plateforms

    I've been having an ongoing problem with some of my images changing color/luminance values after merging or flattening an image. This seems to most often happen if I use one of the filters (like crosshatch or notepaper, not sharpen or blur). I can make a copy using command/option/shift + E which most often will look exactly like what's on screen.
    Some people have suggested that it's to do with resolution, PS showing me a low resolution image but I don't think so because the histogram changes -- sometimes in a big way, but most often those spikes in the luminance levels are shaved off. Also, when I have the image open at 100% and effect a merge/flatten, the color changes.
    I'd like to know if there's a way to have PS show me one for one what I'm working on while I'm working on it, or if there is a way to control the color profiles when I'm saving. My best guess at this point is that there is a color profile mismatch going on somewhere. I just don't know where to look for it.
    Typically I work in 16 bit, so my color space is set to ProPhoto RGB; my camera is set to the Adobe color space;
    color management policies are set to preserve color profiles;
    conversion options --> intent is set to relative colorimetric.

    But it is calibrated. I use Xrite 1 and update it every month (on the first).
    The colors can be really off. Here's an example.
    https://flic.kr/p/r6A1Zd (what I want) https://flic.kr/p/qc5QTD (not what I want)
    Also, I can't see how the bit depth will have any effect since the change in color happens in PS when I merge or flatten. It's 8 bit through the editing and 8 bit when I flatten it.
    Have you any suggestions on what I can do on the computer side?

  • Which color space to save still images for FCP?

    When saving still images as TIFF files to be brought into FCP, what color space should the files be saved in? The Adobe color space or SRGB, or other?
    Thanks.

    sRGB/JPEG is the best because all the color information is encoded in the actual image when you create a JPEG, as JPEGs don't carry color space information with them, like .PSD and .TIFF do.
    As for sRGB, that is as close as there is to a universal color space for monitors, and you are least likely to find a surprise when you check across many monitors. The tradeoff is a reduced color gamut if you display on a well calibrated broad gamut monitor.
    The gamma matters all the way through, if you want what you see in Photoshop to match what you see on a calibrated display monitor. The newest Photoshop, and Lightroom, use a native gamma of 2.2, which matches all video displays (not computer displays). If you generate JPEGs from them, they will have a gamma of 2.2. You then need to import them into FCP with a gamma of 2.2 for the interpretation. If you go directly to DVD from there, all is fine. If you go to a Quicktime movie, you need to know what the codec you plan to use will do. ProRes maintains the existing gamma, H.264 lightens up to 1.8, as does animation. I haven't characterized the others.

  • 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;

  • DCTDecode filter used for image with Indexed color space?

    I've seen examples of images in PDF that have BitsPerComponent=8, with an Indexed Color Space, but the filter is DCTDecode.  This doesn't seem intuitive to me, as JPG supports 24-bit RGB and 8-bit gray.  I haven't heard of 8-bit color JPG so I'm just wondering how this is done?
    I'm just trying to understand how this works if someone could please indulge me with a technical explanation it would be most appreciated.  I understand how the image is represented using the colorspace, I just don't understand how this filter is applicable to 8-bit data.
    Please note, I understand that it's not an actual JPG file, that the data is only using the compression scheme.

    DCTDecode is entirely legal for 1-component (greyscale) samples as you've noted. There is no problem there.
    Remember, that applying a filter (and later decoding it) is entirely separate from the meaning of the data. So it's possible to use filters that just don't map correctly to the data. For example, greyscale DCTDecode could be used to encode samples which were, on decoding, to be treated as RGB. It wouldn't compress well, but the meaning isn't affected.
    But DCTDecode for an Indexed colour space is very unusual. Don't look for special treatment, it would be enconding the image data, which would be offsets into the colour table. And of course DCTDecode is lossy, so decompressed data should be close, but is not always equal, to the original.
    In most cases of Indexed colour, this would lead to random and useless changes to colours. But it is entirely possible to have colours which map into a linear and smooth set of shades of the same colour - such as 256 shades of pink. An image using such an Indexed colour space is a candidate for using DCTDecode.
    In using filters, it is best to forget what you think you know about the data, and just follow the precise rules of the filter.

Maybe you are looking for

  • FUnction Module to Calculate future date after 'x' years

    Hi Gurus, Can anyone tell me the Standard Function Module which will take today's date as i/p & return the date after 10 years. e.g say input date is 18.05.2010 & input year is 10.              output = 17.05.2020 Regards, Rohit.

  • Home Location Nokia Drive +

    Hello I have recently purchased Nokia Lumia 925. How can i setup Home Location in Nokia Drive +. Thanks Pavan

  • Explanation of Error

    In a Java RMI Application that I have developed, when the client tries to establish contact to the server the following error occurs: java.rmi.ConnectException: Connection refused to host: 169.254.196.149; nested exception is: java.net.ConnectExcepti

  • App World Session has expired - how to login?

    I got a notification that an update is available for facebook, so I went to download it. Unfortunately, I am getting an error in App World saying "Your session has expired. Please login to continue." Unfortunately, I can't find anywhere to log in to

  • Which is fast / Smooth performing?

    I have 10 circles on the stage, animated on the time line, simple animation like scale, rotation and size changes. Which will give me best performance in terms of browser load and smoothness of animation? Ellipse or Svg file What if it is 100 objects