Search Results

Search found 2 results on 1 pages for 'erikb'.

Page 1/1 | 1 

  • converting a png with an ICC profile?

    - by jedierikb
    I can convert a jpg from one ICC to another ICC. convert rgb_image.jpg -profile USCoat.icm cmyk_image.jpg Or I can convert a jpg with no ICC to another ICC. convert rgb_image.jpg +profile icm \ -profile sRGB.icc -profile USCoat.icm cmyk_image.jpg But how do I convert a png's pixels into the gamut described by an ICC profile? I understand I cannot embed the profile into the image file, but would at least like to convert the colors. When I reuse the above commands, the colors come out wrong... (different from the colors in the JPG when converted). This is the source image: http://alumni.media.mit.edu/~erikb/tmp/RED_JPG.jpg And here is what I am trying: convert RED_JPG.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc CMYK_PNG.png and this is what I am getting: http://alumni.media.mit.edu/~erikb/tmp/CMYK_PNG.png I was hoping to get an image with the same colors as a JPEG run through the same command: convert RED_JPG.jpg +profile icm -profile sRGB_v4_ICC_preference.icc -profile USWebUncoated.icc CMYK_JPG.jpg resulting in: http://alumni.media.mit.edu/~erikb/tmp/CMYK_JPG.jpg *this image, CMYK_JPG.jpg, is what I am trying to reproduce pixel by pixel in a PNG file.* Any suggestions? Original (unanswered) post here.

    Read the article

  • Java: howto write equals() shorter

    - by erikb
    I get headaches when I have to write nearly 10 lines of code to say 2 Objects are equal, when their type is equal and both's attribute is equal. You can easily see that in this way of writing the number of lines increase drastically with your number of attributes. public class Id implements Node { private String name; public Id(String name) { this.name = name; } public boolean equals(Object o) { if (o == null) return false; if (null == (Id) o) return false; Id i = (Id) o; if ((this.name != null && i.name == null) || (this.name == null && i.name != null)) return false; return (this.name == null && i.name == null) || this.name.equals(i.name); } }

    Read the article

1