当前位置:网站首页>VFP uses Kodak controls to control the scanner to solve the problem that the volume of exported files is too large
VFP uses Kodak controls to control the scanner to solve the problem that the volume of exported files is too large
2022-06-25 11:44:00 【VFP of Garfield】
When the cat is doing scanner control , Kodak scan control used , This control is very practical to control the scanner , It also has the function of picture editing , But there are also problems , The volume of the exported image is too small .
I'm using MYIMG.FLL, It is found that the length and width can be modified in , The length and width of the picture is too small , The file size is enough , But the picture can't be seen clearly .
I studied it , Find the size of the picture , It doesn't just depend on the length and width of the picture , Resolution is also critical . Resolution is DPI, Pictures on our commonly used web pages DPI yes 72,PHOTOSHOP The default is 72.
The scanner is 200-300DPI, So the file volume is huge ,MYIMG You can only get DPI, Do not modify .
Sun, a Buddhist monk, pointed out , Got this function .
Function saveimage2(openfile As String,savefile As String)
lqEncoderClsID_BMP=0h00F47C55041AD3119A730000F81EF32E &&BMP
lqEncoderClsID_JPG=0h01F47C55041AD3119A730000F81EF32E &&JPG
lqEncoderClsID_GIF=0h02F47C55041AD3119A730000F81EF32E &&GIF
lqEncoderClsID_TIF=0h05F47C55041AD3119A730000F81EF32E &&TIF
lqEncoderClsID_PNG=0h06F47C55041AD3119A730000F81EF32E &&PNG
Declare Long GdipLoadImageFromFile In GDIPlus.Dll String cFile, Long @ nativeImage
Declare Long GdipSaveImageToFile In GDIPlus.Dll Long nativeImage, String cFile, ;
String EncoderClsID, String EncoderParameters
Declare Long GdipDisposeImage In GDIPlus.Dll Long nativeImage
lcInputFile=Strconv(openfile+Chr(0),5)
lcOutputFile=Strconv(savefile+Chr(0),5)
lnImage=0
GdipLoadImageFromFile(lcInputFile,@lnImage)
GdipSaveImageToFile(lnImage, lcOutputFile, Evaluate('lqEncoderClsID_'+Upper(Justext(savefile))), Null)
GdipDisposeImage(lnImage)
Erase &openfile
Endfunc
Picture processed by Kodak control , Use this function to save it again , Perfect solution to the problem of excessive file size .
More information :www.sn58.cn
边栏推荐
- GC
- Subclass a inherits from parent class B, a a = new a(); Then the execution sequence of the constructor of parent class B, the static code block of parent class B, the non static code block of parent c
- 云原生数据湖以存储、计算、数据管理等能力通过信通院评测认证
- Spark tuning tool -- detailed explanation of sparklens
- 如何实现移动端富文本编辑器功能
- 元素定位不到的 9 种情况
- RPC typical framework
- 为什么要分布式 id ?分布式 id 生成方案有哪些?
- Spark runs wordcount (case 2)
- JS judge whether a number is in the set
猜你喜欢

为什么要分布式 id ?分布式 id 生成方案有哪些?

Database Series: MySQL index optimization summary (comprehensive version)

ThingsPanel 发布物联网手机客户端(多图)

Source code analysis of AQS & reentrantlock

Redis6 note02 configuration file, publish and subscribe, new data type, jedis operation

Translation of meisai C topic in 2022 + sharing of ideas

TCP如何處理三次握手和四次揮手期間的异常

What are the ways to simulate and burn programs? (including common tools and usage)

Course paper + code and executable EXE file of library information management system based on C language

SQL注入漏洞(绕过篇)
随机推荐
Simple use of stream
時創能源沖刺科創板:擬募資11億 年營收7億淨利反降36%
为什么要分布式 id ?分布式 id 生成方案有哪些?
基于SSH的高校实验室物品管理信息系统的设计与实现 论文文档+项目源码及数据库文件
Double buffer transparent encryption and decryption driven course paper + project source code based on minifilter framework
兴业证券是国企吗?在兴业证券开户资金安全吗?
CFCA Anxin sign access
Idea local launch Flink task
Openfeign uses
元素定位不到的 9 种情况
JS indexof() always returns -1
现在网上炒股开户身份证信息安全吗?
Spark tuning tool -- detailed explanation of sparklens
SQL injection vulnerability (type chapter)
Semaphore source code analysis
Thirty lines of code prevent VFP forms from running repeatedly, and the function supports parameter transfer
牛客网:分糖果问题
客从何处来
按钮多次点击造成结果
Specific meanings of node and edge in Flink graph