hallo leute,
wie kann ich ein cmyk bild in ein rgb bild umwandeln?
wie kann ich ein cmyk bild in ein rgb bild umwandeln?
Diese Seite verwendet Cookies. Durch die Nutzung unserer Seite erklären Sie sich damit einverstanden, dass wir Cookies setzen. Weitere Informationen
Original von hns
Normalerweise sind Bilder in PNG, TIFF, JPEG oder GIF oder sonstwas und nicht in rgb oder cmyk gespeichert. Und jedes Bildformat legt fest ob die Farben als rgb oder cmyk gespeichert sind.
Original von hns
Und eine NSBitmapImageRep ist immer RGB oder RGBA.
Meine ich doch: jedes Bildformat legt fest wie es gespeichert ist: als CMYK oder RGB-Farbraum oder etwas anders (RGB-Farbtabelle bei GIF). Und das schließt natürlich den Fall ein, dass im Dateiformat auch ein oder zwei Bits verschiedene Farbräume erlauben. Damit wird die Umwandlung aber schon beim dekodieren des Farbformats gemacht.Original von mattik
Original von hns
Normalerweise sind Bilder in PNG, TIFF, JPEG oder GIF oder sonstwas und nicht in rgb oder cmyk gespeichert. Und jedes Bildformat legt fest ob die Farben als rgb oder cmyk gespeichert sind.
Hmmm - jetzt bringst Du aber Farbräume und Bildformate etwas durcheinander, oder? Jedes Bild ist sicherlich in einem Format gespeichert, darum ging es macuser ja gar nicht. Aber einen Farbraum hat jedes digitale Bild. Und obwohl nicht alle Kombinationen möglich sind, legt das Format das nicht fest - z.B. können TIFF und JPEG (genauer JFIF) sowohl Bilder im CMYK- als auch im RGB-Farbraum speichern.
Hm: warum steht dann in der Doku unter getBitmapDataPlanes:Original von hns
Und eine NSBitmapImageRep ist immer RGB oder RGBA.
Nein.
Color components in planar configuration are arranged in the expected order—for example, red before green before blue for RGB color.
Ist GraphicConverter eigentlich schon in Core Image und Cocoa umgeschrieben worden?Original von below
Ich weiss von Thorsten Lemke (der mit dem GraphicConverter) die Umwandlung von CMYK nach RGB nicht völlig trivial ist.
Original von hns
Hm: warum steht dann in der Doku unter getBitmapDataPlanes:
Color components in planar configuration are arranged in the expected order—for example, red before green before blue for RGB color.
The spp (samples per pixel) argument is the number of data components. It includes both color components and the coverage component (alpha), if present. Meaningful values range from 1 through 5. An image with cyan, magenta, yellow, and black (CMYK) color components plus a coverage component would have an spp of 5; a grayscale image that lacks a coverage component would have an spp of 1.
Original von mattik
Original von hns
Hm: warum steht dann in der Doku unter getBitmapDataPlanes:
Color components in planar configuration are arranged in the expected order—for example, red before green before blue for RGB color.
Es ist ein Beispiel. Für CMYK wäre es die Reihenfolge Cyan, Magenta, Yellow, Black (Key). In der Doku steht z.B. unter initWithBitmapDataPlanes: ...:
The spp (samples per pixel) argument is the number of data components. It includes both color components and the coverage component (alpha), if present. Meaningful values range from 1 through 5. An image with cyan, magenta, yellow, and black (CMYK) color components plus a coverage component would have an spp of 5; a grayscale image that lacks a coverage component would have an spp of 1.
ich brauche eine Möglichkeit, abzufragen, ob es cmyk oder rgb ist, unabhängig vom Datei-Format, sei es eps oder png, pdf oder jpg. für jpg,tif und png reicht es auch, ein MDItemRef zu erstellen und kMDItemColorSpaceName abzufragen. Aber für pdf, eps u.ä. funktioniert das schon nicht mehr...
Sache hat sich doch nicht erledigt.
Mein Cousin, der das Programm braucht, meint, es gibt cmyk und rgb eps dateien.
Wie kann ich also herausfinden, welchen colorspace nun wirklich die eps datei hat? man suche in google nach "cmyk eps file" download, oder "rgb eps file" download, findet man genug beispiele...
Mit NSImageRep bekomme ich immer NSCalibratedRGBColorSpace, ist also nutzlos... MDItem funzt da nicht, die attributes hat eine eps datei nicht...
DPI kann ich auch nicht errechnen, da ich bei der rep als pixel immer 0x0 bekomme, size ist da...
ok, und wie finde ich nun heraus, wenn bei einer datei nur ein farbraum verwendet wird, welcher das ist?