terwanerik / Retini

A super simple retina (2x, 3x) image converter.
http://terwanerik.github.io/Retini/
MIT License
201 stars 30 forks source link

When quality is 10/10, @2x file size will bigger then @3x (jpeg) #5

Closed powhu closed 7 years ago

powhu commented 7 years ago

Maybe this is bug of NSImageCompressionFactor.

I change the code below fix the problem.

ResizeModel.m 164

NSDictionary *properties = quality == 1.0 ? @{} : @{NSImageCompressionFactor : @(quality)};
NSData *data = [bitmapRep representationUsingType:fileType properties:properties];
terwanerik commented 7 years ago

Ah strange behaviour indeed, might be a but of NSImageCompressionFactor as you mentioned. Pushed a new version out that includes your fixed code. Thanks!