Hello
Starting from an example published on:
[
windevapi.free.fr]
I'm trying to reduce the size of images loaded and saved on a longblob field in a table of a MySql database.
This is the portion of code :
PROCEDURE ReduceSize(InFileName, OutFileName, Quality)
wiaFormatJPEG is string ="B96B3CAE-0728-11D3-9D7B-0000F81EF32E}"
oFichierImage is object Automation dynamic
oProcessImage is object Automation dynamic
oFichierImage = new object Automation "WIA.ImageFile"
oProcessImage = new object Automation "WIA.ImageProcess"
oFichierImage>>LoadFile(InFileName)
oProcessImage>>Filters>>Add(oProcessImage>>FilterInfos("Convert")>>FilterID)
oProcessImage>>Filters(1)>>Properties("FormatID")>>Value = wiaFormatJPEG <<<< The problem is here
oProcessImage>>Filters(1)>>Properties("Quality")>>Value = Quality
oFichierImage = oProcessImage>>Apply(oFichierImage)
oFichierImage>>SaveFile(OutFileName)
This is the error code i see when the routine is executed:
Error at line 29 of Local Procedure ReduceSize process.
Access to Value Automation member.
Erreur 80210065 : Formato dell'ID non valido.
Erreur 80210065 : Formato dell'ID non valido.
For your info i'm working on a Windows 10 pc..
Please, can someone tell me where is the problem??
Thanks in advance
Gianni
Edited 1 time(s). Last edit at 08/02/2017 10:39PM by Gianni Spano.