瀏覽代碼

2024.5.10 批量导出多线程支持

蘭雅sRGB 11 月之前
父節點
當前提交
e02e2557c2
共有 4 個文件被更改,包括 17 次插入1 次删除
  1. 5 0
      AdobeThumbnail.cpp
  2. 4 1
      README.md
  3. 8 0
      corel_thumbnail.cpp
  4. 二進制
      img/bilibili.webp

+ 5 - 0
AdobeThumbnail.cpp

@@ -24,6 +24,10 @@ bool AdobeThumbnail(const char* adobe_filename , const char* savejpeg_filename)
 
     /// ************* 获取 ID或者AI文档 的预览图 **************** ///
     FILE* adobe_file = fopen(adobe_filename, "rb");
+    if(NULL == adobe_file){
+        MessageBoxA(NULL, adobe_filename, "错误File", MB_OK);
+        return false;
+    }
     size_t file_size = get_fileSize(adobe_filename); // 获得文件大小
 
     size_t bufsize = 1 * MBsize;        // AI 和EPS 预览图在开头,INDD文件在末位
@@ -127,6 +131,7 @@ bool  AdobeThumbnail_W(const wchar_t* adobe_filename ,const wchar_t* savejpeg_fi
     char tofile[MAX_PATH] = {0};
     WCHARTochar(fromfile, adobe_filename);
     WCHARTochar(tofile, savejpeg_filename);
+
     bool ret = AdobeThumbnail(fromfile, tofile);
 
 //  printf("%d\t%s\n",ret, fromfile);

+ 4 - 1
README.md

@@ -4,9 +4,12 @@
 
 ### 使用 AdobeThumbnail 参考视频
 
-- bilibili链接: https://www.bilibili.com/video/BV16K411W7ro/
+- bilibili链接: https://www.bilibili.com/video/BV1tT421Q7Kn
 - youtube链接:  https://youtu.be/pH5Zw5Cx6-8
 
+![](https://github.com/hongwenjun/AdobeThumbnail/raw/master/img/bilibili.webp)
+
+
 ## AdobeThumbnail 软件下载
 - [GuiAdobeThumbnail.7z](https://262235.xyz/GuiAdobeThumbnail.7z) 
 

+ 8 - 0
corel_thumbnail.cpp

@@ -154,6 +154,14 @@ bool CorelThumbnail(const char* cdr_filename, const char* png_filename)
         return ret ;
     }
 
+    FILE* pfile = fopen(cdr_filename, "rb");
+    if(NULL == pfile){
+      MessageBoxA(NULL, cdr_filename, "错误File", MB_OK);
+      return false;
+    }
+
+
+
     char bmp_filename[MAX_PATH] = {0};
 
     if (png_filename == NULL) {

二進制
img/bilibili.webp