Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Also write out icon built by setting images, not bitmaps, per image s…

…ize. This is a usable work-around for now...
  • Loading branch information...
commit 136319ddf7a0f9859e15a3e3d2e4f1e34a063845 1 parent 1d851fb
Dan Wood authored May 08, 2012

Showing 1 changed file with 12 additions and 3 deletions. Show diff stats Hide diff stats

  1. 15  ICOFamilyAppDelegate.m
15  ICOFamilyAppDelegate.m
@@ -36,15 +36,24 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
36 36
 	NSBitmapImageRep *bitmap16	= [[test16 representations] lastObject];
37 37
 	NSBitmapImageRep *bitmap32	= [[test32 representations] lastObject];
38 38
 
39  
-	[[bitmap16 TIFFRepresentation] writeToFile:[@"~/Desktop/ICOFamilyTestIcon.16.tiff" stringByExpandingTildeInPath] atomically:NO];
40  
-	[[bitmap32 TIFFRepresentation] writeToFile:[@"~/Desktop/ICOFamilyTestIcon.32.tiff" stringByExpandingTildeInPath] atomically:NO];
  39
+//	[[bitmap16 TIFFRepresentation] writeToFile:[@"~/Desktop/ICOFamilyTestIcon.16.tiff" stringByExpandingTildeInPath] atomically:NO];
  40
+//	[[bitmap32 TIFFRepresentation] writeToFile:[@"~/Desktop/ICOFamilyTestIcon.32.tiff" stringByExpandingTildeInPath] atomically:NO];
41 41
 
42 42
 	ICOFamily *fam = [ICOFamily family]; // Returns an autoreleased instance
  43
+    
  44
+    [fam setImage:test16 forElement:kICOFamily16Element];
  45
+	[fam setImage:test32 forElement:kICOFamily32Element];
  46
+
  47
+    [fam.data writeToFile:[@"~/Desktop/ICOFamilyTestIconFromImages.ico" stringByExpandingTildeInPath] atomically:NO];
  48
+
  49
+    // Now try again with the bitmap technique, which chokes on 32-bit images apparently
  50
+    
  51
+	fam = [ICOFamily family]; // Returns an autoreleased instance
43 52
 
44 53
 	[fam setBitmapImageRep:bitmap16 forElement:kICOFamily16Element];
45 54
 	[fam setBitmapImageRep:bitmap32 forElement:kICOFamily32Element];
46 55
 
47  
-	[fam.data writeToFile:[@"~/Desktop/ICOFamilyTestIcon.ico" stringByExpandingTildeInPath] atomically:NO];
  56
+	[fam.data writeToFile:[@"~/Desktop/ICOFamilyTestIconFromBitmaps.ico" stringByExpandingTildeInPath] atomically:NO];
48 57
 }
49 58
 
50 59
 @end

0 notes on commit 136319d

Please sign in to comment.
Something went wrong with that request. Please try again.