Problem with CatchImage and EncodeImage
Posted: Thu May 29, 2014 1:48 pm
Hello together,
I have a problem, to catch an image. I build a loop to see, if it is a time problem.
The Problem is, it hangs on the first loop.
Now my question: Is it a hardware-defect, or other ...
I have the same problem by using
*Puffer = EncodeImage(#Image [, ImagePlugin [, Flags [, Tiefe]]])
My system is win 7 prof.
I thank you for any idea ...
Greetings
Hier is the Code:
----------------------------------------------------------------------------------------------------
#Image=0
Debug #PB_Any
UseJPEGImageEncoder()
Debug FileSize(Datei)
RetCode=0
While RetCode = 0
RetCode=CatchImage(#Image, ?Logo, ?endLogo-?Logo): Debug RetCode
Wend
Debug "Geladen ..."
If IsImage(#Image) = 0
Debug "Image ist nicht geladen ...!"
EndIf
UseJPEGImageEncoder()
While *Puffer = 0
*Puffer=EncodeImage(ImageID(#Image) ,#PB_ImagePlugin_JPEG)
Wend
DataSection
Logo:
IncludeBinary "T:\Temp\Temp.jpg"
endLogo:
EndDataSection
---------------------------------------------------------------------------------------------------
I have a problem, to catch an image. I build a loop to see, if it is a time problem.
The Problem is, it hangs on the first loop.
Now my question: Is it a hardware-defect, or other ...
I have the same problem by using
*Puffer = EncodeImage(#Image [, ImagePlugin [, Flags [, Tiefe]]])
My system is win 7 prof.
I thank you for any idea ...

Greetings
Hier is the Code:
----------------------------------------------------------------------------------------------------
#Image=0
Debug #PB_Any
UseJPEGImageEncoder()
Debug FileSize(Datei)
RetCode=0
While RetCode = 0
RetCode=CatchImage(#Image, ?Logo, ?endLogo-?Logo): Debug RetCode
Wend
Debug "Geladen ..."
If IsImage(#Image) = 0
Debug "Image ist nicht geladen ...!"
EndIf
UseJPEGImageEncoder()
While *Puffer = 0
*Puffer=EncodeImage(ImageID(#Image) ,#PB_ImagePlugin_JPEG)
Wend
DataSection
Logo:
IncludeBinary "T:\Temp\Temp.jpg"
endLogo:
EndDataSection
---------------------------------------------------------------------------------------------------