Skip to content

Commit

Permalink
Merge branch 'release/1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Takeru Chuganji committed Mar 22, 2015
2 parents 9c556dc + b95611e commit 82f92ab
Show file tree
Hide file tree
Showing 19 changed files with 1,246 additions and 1,048 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: objective-c
script:
- xctool -workspace HCImage+BPG.xcworkspace -scheme Example-Mac
- xctool -workspace HCImage+BPG.xcworkspace -scheme Example-iOS -sdk iphonesimulator
4 changes: 1 addition & 3 deletions Example/Example-Mac/AppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
// AppDelegate.h
// Example-Mac
//
// Created by Takeru Chuganji on 1/4/15.
// Created by Takeru Chuganji on 3/22/15.
//
//

#import <Cocoa/Cocoa.h>

@interface AppDelegate : NSObject <NSApplicationDelegate>


@end

10 changes: 7 additions & 3 deletions Example/Example-Mac/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,24 @@
// AppDelegate.m
// Example-Mac
//
// Created by Takeru Chuganji on 1/4/15.
// Created by Takeru Chuganji on 3/22/15.
//
//

#import "AppDelegate.h"
#import "HCImage+BPG.h"

@interface AppDelegate ()

@property (weak) IBOutlet NSWindow *window;
@property (weak) IBOutlet NSImageView *imageView;
@end

@implementation AppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
// Insert code here to initialize your application
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"bpg"];
NSData *data = [NSData dataWithContentsOfFile:filePath];
self.imageView.image = [NSImage imageWithBPGData:data];
}

- (void)applicationWillTerminate:(NSNotification *)aNotification {
Expand Down
696 changes: 0 additions & 696 deletions Example/Example-Mac/Base.lproj/Main.storyboard

This file was deleted.

694 changes: 694 additions & 0 deletions Example/Example-Mac/Base.lproj/MainMenu.xib

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Example/Example-Mac/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSMainStoryboardFile</key>
<string>Main</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
Expand Down
15 changes: 0 additions & 15 deletions Example/Example-Mac/ViewController.h

This file was deleted.

30 changes: 0 additions & 30 deletions Example/Example-Mac/ViewController.m

This file was deleted.

2 changes: 1 addition & 1 deletion Example/Example-Mac/main.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// main.m
// Example-Mac
//
// Created by Takeru Chuganji on 1/4/15.
// Created by Takeru Chuganji on 3/22/15.
//
//

Expand Down
2 changes: 1 addition & 1 deletion Example/Example-MacTests/Example_MacTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Example_MacTests.m
// Example-MacTests
//
// Created by Takeru Chuganji on 1/4/15.
// Created by Takeru Chuganji on 3/22/15.
//
//

Expand Down
564 changes: 281 additions & 283 deletions Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

112 changes: 112 additions & 0 deletions Example/Example.xcodeproj/xcshareddata/xcschemes/Example-Mac.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B12FC71ABEC955005932F4"
BuildableName = "Example-Mac.app"
BlueprintName = "Example-Mac"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B12FD91ABEC955005932F4"
BuildableName = "Example-MacTests.xctest"
BlueprintName = "Example-MacTests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B12FD91ABEC955005932F4"
BuildableName = "Example-MacTests.xctest"
BlueprintName = "Example-MacTests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B12FC71ABEC955005932F4"
BuildableName = "Example-Mac.app"
BlueprintName = "Example-Mac"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B12FC71ABEC955005932F4"
BuildableName = "Example-Mac.app"
BlueprintName = "Example-Mac"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B12FC71ABEC955005932F4"
BuildableName = "Example-Mac.app"
BlueprintName = "Example-Mac"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
112 changes: 112 additions & 0 deletions Example/Example.xcodeproj/xcshareddata/xcschemes/Example-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0620"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4D88E1A5975880090300C"
BuildableName = "Example-iOS.app"
BlueprintName = "Example-iOS"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4D8A71A5975880090300C"
BuildableName = "Example-iOSTests.xctest"
BlueprintName = "Example-iOSTests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4D8A71A5975880090300C"
BuildableName = "Example-iOSTests.xctest"
BlueprintName = "Example-iOSTests"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4D88E1A5975880090300C"
BuildableName = "Example-iOS.app"
BlueprintName = "Example-iOS"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4D88E1A5975880090300C"
BuildableName = "Example-iOS.app"
BlueprintName = "Example-iOS"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "00B4D88E1A5975880090300C"
BuildableName = "Example-iOS.app"
BlueprintName = "Example-iOS"
ReferencedContainer = "container:Example.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
2 changes: 1 addition & 1 deletion HCImage+BPG.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "HCImage+BPG"
s.version = "1.0"
s.version = "1.1"
s.source = { :git => "https://github.com/hoppenichu/HCImage-BPG.git", :tag => s.version }

s.summary = "BPG decoder for iOS and OS X"
Expand Down
7 changes: 4 additions & 3 deletions HCImage+BPG/HCImage+BPG.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ static void release_image_data(void *info, const void *data, size_t size) {
+ (HCImage *)imageWithBPGData:(NSData *)data {
BPGDecoderContext *decoderContext;
decoderContext = bpg_decoder_open();
if (bpg_decoder_decode(decoderContext, [data bytes], (int) [data length]) < 0) {
if (bpg_decoder_decode(decoderContext, data.bytes, (int) data.length) < 0) {
bpg_decoder_close(decoderContext);
return nil;
}
BPGImageInfo imageInfo;
bpg_decoder_get_info(decoderContext, &imageInfo);

const size_t width = (size_t) imageInfo.width;
const size_t height = (size_t) imageInfo.height;
const size_t width = imageInfo.width;
const size_t height = imageInfo.height;

const size_t lineSize = 4 * width;
const size_t size = lineSize * height;
Expand Down
2 changes: 1 addition & 1 deletion HCImage+BPG/libbpg/VERSION
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.4
0.9.5
Loading

0 comments on commit 82f92ab

Please sign in to comment.