swfから画像を抽出するコマンドラインアプリケーション
Revision | 8202398d65a4078556f499529c92e23e94180be1 (tree) |
---|---|
Time | 2016-09-16 21:54:18 |
Author | masakih <masakih@user...> |
Commiter | masakih |
エラーメッセージを修正
@@ -47,7 +47,7 @@ void saveDataWithExtension(id data, NSString *extention, int tagCount) { | ||
47 | 47 | void saveImageAsPNG(id image, int tagCount) { |
48 | 48 | NSData *tiffData = [image TIFFRepresentation]; |
49 | 49 | if(!tiffData) { |
50 | - fprintf(stderr, "Can not create masked image.\n"); | |
50 | + fprintf(stderr, "Can not create TIFF representation.\n"); | |
51 | 51 | return; |
52 | 52 | } |
53 | 53 |
@@ -195,6 +195,11 @@ void storeBitLossless2ColorTable(const unsigned char *p, UInt32 length, int tagC | ||
195 | 195 | free(imageDataP); |
196 | 196 | imageDataP = NULL; |
197 | 197 | |
198 | + if(!imageRef) { | |
199 | + fprintf(stderr, "Can not create ImageRef from maked bitmap."); | |
200 | + return; | |
201 | + } | |
202 | + | |
198 | 203 | saveImageAsPNG(imageRef, tagCount); |
199 | 204 | } |
200 | 205 | void storeBitsLossless2(const unsigned char *p, UInt32 length, int tagCount) { |