ChangePDFContrast icon indicating copy to clipboard operation
ChangePDFContrast copied to clipboard

增强PDF对比度。Enhance the contrast of the scanned PDF

Results 2 ChangePDFContrast issues
Sort by recently updated
recently updated
newest added

首先我在安装的时候报错,后来删了在requirements.txt里的指定版本才安装成功,看来其中一些插件的旧版本已经不提供安装。 然后在使用过程中也报错了,log如下 D:\Program Files Green\ChangePDFContrast>"D:\Program Files Green\ChangePDFContrast\main.py" ======第一步:分解===== 正在调用PDF转PIL数组的库函数,如果你电脑内存太小且PDF太大,有可能内存崩掉,那跟我没关系,自己找pdf2img的作者哭去,反正我32G不慌... 耐心等一会儿... 分解完成,用时0.94秒 ======第二步:图片处理===== 正在处理第1张图片... D:\Program Files Green\ChangePDFContrast\pdf_enhance.py:18: RuntimeWarning: overflow encountered in scalar add LUT[range_min:range_max+1]=np.linspace(start=0,stop=255,num=(range_max-range_min)+1,endpoint=True,dtype=np.uint8) Traceback (most recent call last): File "D:\Program...

for img in images: 循环结构中 img 对象没有释放,当运行电脑内存不大时(我工位电脑的是16 G),使用pdf 700多页,一定会触发异常,在循环结构中添加img.close()内存最大占用3G左右可以运行结束