color-space

How to read the colorspace being used in an image

How, in C#, can I define the colorspace a JPG is in? I am trying to create a small app to automatically convert to sRGB any image submitted in AdobeRGB colorspace. Thank you for your help. ...

How can I use the HSL colorspace in Java?

I've had a look at the ColorSpace class, and found the constant TYPE_HLS (which presumably is just HSL in a different order). Can I use this constant to create a Color from hue, saturation, and luminosity? If not, are there any Java classes for this, or do I need to write my own? ...

iPhone screenshot different colour when displayed

I've taken a screenshot of my iPhone app running and I'd like to use that image as a png to be drawn by the app instead of generated graphics. When I take the screenshot, it looks fine. However, when that is saved as a PNG file, added to the Xcode project and then displayed back on the screen of the phone (or simulator) the colours are ...

Calculate CMYK coverage on PDF

Hi all, I don't suppose is there any free or open source libraries out there that able to calculate the CMYK coverage on a pdf file. I tried looking around I don't seem to able to find any. If there isn't any out there if anyone could point me in the right direction of what do I need to do in order to calculate the CYMK coverage on a pd...

Using PIL and NumPy to convert an image to Lab array, modify the values and then convert back

I am trying to convert a PIL image into an array using NumPy. I then want to convert that array into Lab values, modify the values and then convert the array back in to an image and save the image. I have the following code: import Image, color, numpy # Open the image file src = Image.open("face-him.jpg") # Attempt to ensure image is ...

Is there a definition freely available for the colorspace conversion from MEDIASUBTYPE_YUY2 to MEDIASUBTYPE_RGB24 ?

I'm currently looking to implement a directshow filter to convert the colorspace from the output of the standard SampleGrabber to the Video Mixing Renderer. All of the video decoders I'm using output the MEDIASUBTYPE_YUY2 and I need to convert to MEDIASUBTYPE_RGB24. Does anyone know of a freely available filter or definition of this con...

Best resources to learn about graphics and imaging?

Having spent a bunch of time recently doing 2D work that involves pixel manipulation of bitmaps and blending/compositing, I've run up against the limits of my own understanding with respect to colorspaces, non-RGB color worlds, etc. I'd like to go back to basics and learn how all this stuff actually works, so that I'm not shooting in th...

How can one perform color transforms with ICC profiles on a set of arbitrary pixel values not in an image?

I'd like to convert a set of pixel values from one profiled colorspace to another, without these values residing in an image file, such as (say) a list of RGB/RGBA/CMYK/etc data structures. I have python and PIL at my disposal (but I'm interested in solutions in related environments if that's what it takes). The latest PIL has very nic...

hex <-> RGB <-> HSV Color space conversion with Python

For this project I use Python's colorsys to convert RGB to HSV vice versa to be able to manipulate saturation and lightness, but I noticed that some colors yields bogus results. For example, if I take any primary colors there's no problem: However if I chose a random RGB color and convert it to HSV, I sometime gets bogus results. ...

How to calculate color shadows codes ?

I would like to know / calculate color codes of N red shadows (N can be 5, 20, or 50, for example). How could I do this ? I noticed, for example, that the following gives some red shadows: R = 255, G = B = 0..255 R = 0..255, G = B = 0 Is there any known method to calculate shadows ? ...

Use a LinearGradientBrush in another LinearGradientBrush?

Hi, I'm trying to use one LinearGradientBrush in the Definition of another LinearGradientBrush. But I've no idea weather this would even work, and if it works, I need to know how. For Example: <LinearGradientBrush x:Key="ComboBoxFocusBackgroundBrush" EndPoint="0.5,1" StartPoint="0.5,0"> <GradientStop Color="#FFFDEEB3" Off...

Converting to YUV / YCbCr colour space - many versions

There are many different colour conversions to YUV but they all have different results! Which one is officially correct? This is the output from my test program. I have input R=128 G=50 B=50 (max value is 255). The table shows the converted YUV values, and the re-converted RGB values (which don't match the original). ./ColourConversion...

Plotting RGB spectrum as 2-d color matrix?

Any suggestions on how I might go about plotting the RGB color space as a 2-D matrix? I need a theoretical description of what's going on; a code sample or pseudocode would be helpful but is not required. Thanks! ...