Skip to content

Commit

Permalink
Improved the accuracy of colors written out to *.ico files
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrajca committed Apr 29, 2012
1 parent 35b9a8d commit 435b138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Archiving/Image Exporters/PXIconExporter.m
Expand Up @@ -135,7 +135,7 @@ - (void)writeImageData:(NSMutableData *)data withCanvas:(PXCanvas *)canvas
int bytesWritten = 0;
for (i = 0; i < canvasSize.width; i++)
{
NSColor *color = [NSReadPixel(NSMakePoint(i, j)) colorUsingColorSpaceName:NSCalibratedRGBColorSpace];
NSColor *color = NSReadPixel(NSMakePoint(i, j));
byte colors[4];
colors[3] = (byte) round([color alphaComponent] * 255);
colors[2] = (byte) round([color redComponent] * 255);
Expand Down

0 comments on commit 435b138

Please sign in to comment.