当前位置:网站首页>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.
PS Default canvas

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

原网站

版权声明
本文为[VFP of Garfield]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200535523206.html