CMYK support?
Posted: Wed Jun 04, 2008 5:58 pm
Does Xnview support cmyk ? Can i convert an rgg image > cmyk ???
Tnx a lot.
Tnx a lot.
Various discussion boards for XnView and related products
https://newsgroup.xnview.com/
No sorryJustanick wrote:Does Xnview support cmyk ? Can i convert an rgg image > cmyk ???
Tnx a lot.
maybe xnview should notify user when opening CMYK images at the moment.xnview wrote:No sorryJustanick wrote:Does Xnview support cmyk ? Can i convert an rgg image > cmyk ???
Tnx a lot.
Code: Select all
public int[] rgb2cmyk(int R,int G,int B){
int cmyk []= new int[4];
cmyk[3]=(int)(Math.min(Math.min(255-R,255-G),255-B)/2.55);//cmykK
int MyR = (int)(R/2.55);
int Div = 100-cmyk[3];
if (Div == 0)Div = 1;
cmyk[0] = ((100-MyR-cmyk[3])/Div)*100;//cmykC
int MyG = (int)(G/2.55);
cmyk[1] = ((100-MyG-cmyk[3])/Div)*100;
int MyB = (int)(B/2.55);
cmyk[2] = ((100-MyB-cmyk[3])/Div)*100;
return cmyk;
}
public Color cmyk2rgb(int C,int M,int Y,int K){
float MyC = C/100;
float MyM = M/100;
float MyY = Y/100;
float MyK = K/100;
int R = (int)((1-(MyC*(1-MyK)+MyK))*255);
int G = (int)((1-(MyM*(1-MyK)+MyK))*255);
int B = (int)((1-(MyY*(1-MyK)+MyK))*255);
if (R<0) R=0;
if (G<0) G=0;
if (B<0>255) R=255;
if (G>255) G=255;
if (B>255) B=255;
Color rgb = new Color(R,G,B);
return rgb;
}
Very nice suggestion, I support it! It could be a notifications with a checkbox "Do not show again". This way, new users will be informed and thus reduce confusion about CMYK.roytam1 wrote:... maybe xnview should notify user when opening CMYK images at the moment. ...
maybe xnview should notify user when opening CMYK images at the moment.
Why not?xnview wrote:No sorryJustanick wrote:Does Xnview support cmyk ? Can i convert an rgg image > cmyk ???
Tnx a lot.