Skip to content

Commit

Permalink
Fixed issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
terwanerik committed Dec 27, 2016
1 parent 0bff9e5 commit 3bb6262
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 36 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Retini.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@
038880A61B305F6300F8807F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0700;
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = "ET-ID";
TargetAttributes = {
038880AD1B305F6300F8807F = {
Expand Down Expand Up @@ -375,8 +375,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
Expand Down Expand Up @@ -419,8 +421,10 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
LastUpgradeVersion = "0820"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Binary file not shown.
Binary file modified Retini.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion Retini/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0.10</string>
<string>1.1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
3 changes: 2 additions & 1 deletion Retini/ResizeModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ - (BOOL)saveImage:(NSImage *)image toPath:(NSString *)path
quality = [[NSUserDefaults standardUserDefaults] integerForKey:@"jpegQuality"] / 10;
}

NSData *data = [bitmapRep representationUsingType:fileType properties:[NSDictionary dictionaryWithObject:[NSNumber numberWithFloat:quality] forKey:NSImageCompressionFactor]];
NSDictionary *properties = quality == 1.0 ? @{} : @{NSImageCompressionFactor : @(quality)};
NSData *data = [bitmapRep representationUsingType:fileType properties:properties];

if([[NSUserDefaults standardUserDefaults] integerForKey:@"pngOut"] == 1){
if([data writeToFile:path atomically:YES]){
Expand Down

0 comments on commit 3bb6262

Please sign in to comment.