Re: Java/Cocoa save PNG file differences -- More.
Re: Java/Cocoa save PNG file differences -- More.
- Subject: Re: Java/Cocoa save PNG file differences -- More.
- From: John Stiles <email@hidden>
- Date: Mon, 20 Jun 2005 10:15:55 -0700
You could parse the PNG file by hand (or maybe even via libpng) and
remove the block which contains the profile. That would honestly not
be a lot of code.
Or maybe you could use non-Apple libraries to make the PNG, which
might give you more control over what chunks are output.
On Jun 20, 2005, at 9:10 AM, String Larson wrote:
The difference is that the 10.4 version contains an Embedded ICC
Profile whereas the 10.3 version just has a (gAMA) defined as
0.55556. I use the following code to create the file:
public void write(NSImage image, String fileName) {
NSBitmapImageRep bmir = new NSBitmapImageRep(image
.TIFFRepresentation());
NSData data = bmir.representationUsingType
(NSBitmapImageRep.PNGFileType, null);
fileName += ".png";
try {
URL f = new URL("file://"+fileName);
data.writeToURL(f, false);
} catch (MalformedURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
Is there anyway to control the way OSX writes PNG files (from Java)
and/or the color profile ?
On Jun 20, 2005, at 7:26 AM, String Larson wrote:
Apologies in advance for the cross-post.
Attached are two PNG files. Both created with the same code
running Java 1.4.2. One running on OSX v10.3.9, the other on v10.4.1.
10.3.9:
<601-10.3.9.png>
104.1:
<601-10.4.1.png>
Ultimately, these get converted to SWFs and imported to a Flash
UI. The problem with the 10.4.1 file is that the alpha appears
messed up when the image is overlaid in Flash. The 10.3.9 version
is fine.
I've searched the archives related to the Red/Blue swap problem
but found no answers.
Is anyone from Apple listening ?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40blizzard.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden