ViciousXUSMC Posted April 29, 2016 Posted April 29, 2016 (edited) So a little project I am working on. I sort of have this working via Irfanview using cmd scripting, but curious if it can be done in AutoIT maybe with GDI+ or any other native tool. I have an ancient microfilm scanner, and currently the only way it will scan is to take a full screen scan of 11x14 and make it a 2 page 8.5x11 Tiff Image. So this is cutting the image in half down the middle. What I need to do is have the 2nd page append to the first page on the right side, and then save the image as a single flat new image (Do not care about format very much) Any of the GDI wizards think this can be done? Here is my starting point, I can open the image, convert the format to .jpg and flatten it (lose the 2nd page of the TIF) I have not quite figured out how to grab that 2nd page or do the append (panorama #Include <GDIPlus.au3> Local $hImage, $sCLSID _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test3.tif") $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $sCLSID2 = _GDIPlus_EncodersGetCLSID("JPG") _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID2) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Edit: got a lead on the multipage stuff: And my code has grown into something where I am trying to draw an image ontop of the first image but it looks like it wont expand the canvas, but ultimately I was thinking just draw the 2nd page next to the 1st page once I figure out how to capture the 2nd page. #Include <GDIPlus.au3> Local $hImage, $sCLSID _GDIPlus_Startup() $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Test3.tif") $sCLSID = _GDIPlus_EncodersGetCLSID("TIF") $sCLSID2 = _GDIPlus_EncodersGetCLSID("JPG") $iWidth = _GDIPlus_ImageGetWidth($hImage) $iHeight = _GDIPlus_ImageGetHeight($hImage) ; Draw one image in another $hGraphics = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsDrawImage($hGraphics, $hImage, $iWidth, $iHeight) _GDIPlus_ImageSaveToFileEx($hImage, @ScriptDir & "\GDIPlus_Image2.jpg", $sCLSID2) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Edited April 29, 2016 by ViciousXUSMC
UEZ Posted April 29, 2016 Posted April 29, 2016 Do you have an example TIFF image which we can work on? Thx. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
ViciousXUSMC Posted April 29, 2016 Author Posted April 29, 2016 Yeah attached to this post. Test3.tif
UEZ Posted April 29, 2016 Posted April 29, 2016 You can do something like this here: expandcollapse popup#include <GDIPlus.au3> _GDIPlus_Startup() Global $aBitmaps = _GDIPlus_ImageLoadFromMultiPageImage(@ScriptDir & "\Test3.tif") Global $i, $iW = 0, $iH = 0, $iX = 0 For $i = 1 to $aBitmaps[0] $iW += _GDIPlus_ImageGetWidth($aBitmaps[$i]) $iH = _GDIPlus_ImageGetHeight($aBitmaps[$i]) > $iH ? _GDIPlus_ImageGetHeight($aBitmaps[$i]) : $iH Next $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap) $iW = 0 For $i = $aBitmaps[0] To 1 Step - 1 _GDIPlus_GraphicsDrawImageRect($hGfx, $aBitmaps[$i], $iW, 0, _GDIPlus_ImageGetWidth($aBitmaps[$i]), _GDIPlus_ImageGetHeight($aBitmaps[$i])) $iW += _GDIPlus_ImageGetWidth($aBitmaps[$i]) Next $sSave = @ScriptDir & "\Test3.gif" _GDIPlus_ImageRotateFlip($hBitmap, 6) _GDIPlus_ImageSaveToFile($hBitmap, $sSave) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBitmap) For $i = 1 to $aBitmaps[0] _GDIPlus_BitmapDispose($aBitmaps[$i]) Next _GDIPlus_Shutdown() ShellExecute($sSave) ;code by Eukalyptus Func _GDIPlus_ImageLoadFromMultiPageImage($sPath) Local $hImage = _GDIPlus_ImageLoadFromFile($sPath) If @error Then Return SetError(1, 1, False) Local $iCount = _GDIPlus_ImageGetFrameDimensionsCount($hImage) If Not $iCount Then Return SetError(1, 2, False) Local $aList = _GDIPlus_ImageGetFrameDimensionsList($hImage) If @error Or Not IsArray($aList) Then Return SetError(1, 3, False) Local $iPixelFormat, $iImageW, $iImageH Local $aReturn[1], $iCnt = 0 For $i = 1 To $aList[0] $iCount = _GDIPlus_ImageGetFrameCount($hImage, $aList[$i]) For $j = 1 To $iCount _GDIPlus_ImageSelectActiveFrame($hImage, $aList[$i], $j) $iCnt += 1 ReDim $aReturn[$iCnt + 1] $iPixelFormat = _GDIPlus_ImageGetPixelFormat($hImage) $iImageW = _GDIPlus_ImageGetWidth($hImage) $iImageH = _GDIPlus_ImageGetHeight($hImage) $aReturn[$iCnt] = _GDIPlus_BitmapCloneArea($hImage, 0, 0, $iImageW, $iImageH, $iPixelFormat) Next Next _GDIPlus_ImageDispose($hImage) $aReturn[0] = $iCnt Return $aReturn EndFunc ;==>_GDIPlus_ImageLoadFromMultiPageImage Func _GDIPlus_ImageGetFrameDimensionsCount($hImage) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "handle", $hImage, "uint*", 0) If @error Then Return SetError(@error, @extended, -1) If $aResult[0] Then Return SetError(10, $aResult[0], False) Return $aResult[2] EndFunc ;==>_GDIPlus_ImageGetFrameDimensionsCount Func _GDIPlus_ImageGetFrameDimensionsList($hImage) Local $iI, $iCount, $tBuffer, $pBuffer, $aPropertyIDs[1], $aResult $iCount = _GDIPlus_ImageGetFrameDimensionsCount($hImage) If @error Then Return SetError(@error, @extended, -1) $tBuffer = DllStructCreate("byte[" & $iCount * 16 & "]") $pBuffer = DllStructGetPtr($tBuffer) $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameDimensionsList", "handle", $hImage, "ptr", $pBuffer, "int", $iCount) If @error Then Return SetError(@error, @extended, -1) If $aResult[0] Then Return SetError(10, $aResult[0], False) ReDim $aPropertyIDs[$iCount + 1] $aPropertyIDs[0] = $iCount For $iI = 1 To $iCount $aPropertyIDs[$iI] = _WinAPI_StringFromGUID($pBuffer) $pBuffer += 16 Next Return $aPropertyIDs EndFunc ;==>_GDIPlus_ImageGetFrameDimensionsList TouchOdeath and ViciousXUSMC 2 Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
ViciousXUSMC Posted April 29, 2016 Author Posted April 29, 2016 (edited) I needed to add in the getframecount function. After I am getting an error on the DLL Call $aResult = DllCall($ghGDIPDll, "int", "GdipImageGetFrameCount", "handle", $hImage, "ptr", $pGUID, "uint*", 0) Missing a declaration for $ghGDIPDII Edit: Searched and found it should be $__g_hGDIPDll Got my working code up to this for now. I may make it even more automated and actually automate the scan in the future. expandcollapse popup#include <GDIPlus.au3> #include <Array.au3> #include <File.au3> #pragma compile(Icon, E:\Users\it022565\Desktop\Desktop\System Tools\iconsext\icons\imageres_34.ico) $sScans = "C:\Scans" $sProcessed = "C:\Scans\Processed\" $sMerged = "C:\Scans\Merged\" Local $sDrive Local $sDir Local $sFileName Local $sExtension DirCreate($sProcessed) DirCreate($sMerged) $aFiles = _FileListToArray($sScans, "*.tif", $FLTA_FILES, True) _GDIPlus_Startup() For $i2 = 1 to $aFiles[0] $aPathSplit = _PathSplit($aFiles[$i2], $sDrive, $sDir, $sFileName, $sExtension) Global $aBitmaps = _GDIPlus_ImageLoadFromMultiPageImage($aFiles[$i2]) Global $i, $iW = 0, $iH = 0, $iX = 0 For $i = 1 to $aBitmaps[0] $iW += _GDIPlus_ImageGetWidth($aBitmaps[$i]) $iH = _GDIPlus_ImageGetHeight($aBitmaps[$i]) > $iH ? _GDIPlus_ImageGetHeight($aBitmaps[$i]) : $iH Next $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap) $iW = 0 For $i = $aBitmaps[0] To 1 Step - 1 _GDIPlus_GraphicsDrawImageRect($hGfx, $aBitmaps[$i], $iW, 0, _GDIPlus_ImageGetWidth($aBitmaps[$i]), _GDIPlus_ImageGetHeight($aBitmaps[$i])) $iW += _GDIPlus_ImageGetWidth($aBitmaps[$i]) Next $sSave = $sMerged & $sFileName & ".gif" _GDIPlus_ImageRotateFlip($hBitmap, 6) _GDIPlus_ImageSaveToFile($hBitmap, $sSave) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBitmap) For $i = 1 to $aBitmaps[0] _GDIPlus_BitmapDispose($aBitmaps[$i]) Next FileMove($aFiles[$i2], $sProcessed) Next _GDIPlus_Shutdown() ;ShellExecute($sSave) Func _GDIPlus_ImageLoadFromMultiPageImage($sPath) Local $hImage = _GDIPlus_ImageLoadFromFile($sPath) If @error Then Return SetError(1, 1, False) Local $iCount = _GDIPlus_ImageGetFrameDimensionsCount($hImage) If Not $iCount Then Return SetError(1, 2, False) Local $aList = _GDIPlus_ImageGetFrameDimensionsList($hImage) If @error Or Not IsArray($aList) Then Return SetError(1, 3, False) Local $iPixelFormat, $iImageW, $iImageH Local $aReturn[1], $iCnt = 0 For $i = 1 To $aList[0] $iCount = _GDIPlus_ImageGetFrameCount($hImage, $aList[$i]) For $j = 1 To $iCount _GDIPlus_ImageSelectActiveFrame($hImage, $aList[$i], $j) $iCnt += 1 ReDim $aReturn[$iCnt + 1] $iPixelFormat = _GDIPlus_ImageGetPixelFormat($hImage) $iImageW = _GDIPlus_ImageGetWidth($hImage) $iImageH = _GDIPlus_ImageGetHeight($hImage) $aReturn[$iCnt] = _GDIPlus_BitmapCloneArea($hImage, 0, 0, $iImageW, $iImageH, $iPixelFormat) Next Next _GDIPlus_ImageDispose($hImage) $aReturn[0] = $iCnt Return $aReturn EndFunc ;==>_GDIPlus_ImageLoadFromMultiPageImage Func _GDIPlus_ImageGetFrameDimensionsCount($hImage) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameDimensionsCount", "handle", $hImage, "uint*", 0) If @error Then Return SetError(@error, @extended, -1) If $aResult[0] Then Return SetError(10, $aResult[0], False) Return $aResult[2] EndFunc ;==>_GDIPlus_ImageGetFrameDimensionsCount Func _GDIPlus_ImageGetFrameDimensionsList($hImage) Local $iI, $iCount, $tBuffer, $pBuffer, $aPropertyIDs[1], $aResult $iCount = _GDIPlus_ImageGetFrameDimensionsCount($hImage) If @error Then Return SetError(@error, @extended, -1) $tBuffer = DllStructCreate("byte[" & $iCount * 16 & "]") $pBuffer = DllStructGetPtr($tBuffer) $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameDimensionsList", "handle", $hImage, "ptr", $pBuffer, "int", $iCount) If @error Then Return SetError(@error, @extended, -1) If $aResult[0] Then Return SetError(10, $aResult[0], False) ReDim $aPropertyIDs[$iCount + 1] $aPropertyIDs[0] = $iCount For $iI = 1 To $iCount $aPropertyIDs[$iI] = _WinAPI_StringFromGUID($pBuffer) $pBuffer += 16 Next Return $aPropertyIDs EndFunc ;==>_GDIPlus_ImageGetFrameDimensionsList Func _GDIPlus_ImageSaveAddImage($hImage, $hImageNew, $pParams) Local $aResult = DllCall($__g_hGDIPDll, "int", "GdipSaveAddImage", "handle", $hImage, "handle", $hImageNew, "ptr", $pParams) If @error Then Return SetError(@error, @extended, False) If $aResult[0] Then Return SetError(10, $aResult[0], False) Return $aResult[0] = 0 EndFunc ;==>_GDIPlus_ImageSaveAddImage Func _GDIPlus_ImageGetFrameCount($hImage, $sDimensionID) Local $tGUID, $pGUID, $aResult $tGUID = _WinAPI_GUIDFromString($sDimensionID) $pGUID = DllStructGetPtr($tGUID) $aResult = DllCall($__g_hGDIPDll, "int", "GdipImageGetFrameCount", "handle", $hImage, "ptr", $pGUID, "uint*", 0) If @error Then Return SetError(@error, @extended, -1) If $aResult[0] Then Return SetError(10, $aResult[0], -1) Return $aResult[3] EndFunc ;==>_GDIPlus_ImageGetFrameCount Func _GDIPlus_ImageSelectActiveFrame($hImage, $sDimensionID, $iFrameIndex) Local $pGUID, $tGUID, $aResult $tGUID = DllStructCreate($tagGUID) $pGUID = DllStructGetPtr($tGUID) _WinAPI_GUIDFromStringEx($sDimensionID, $pGUID) $aResult = DllCall($__g_hGDIPDll, "uint", "GdipImageSelectActiveFrame", "handle", $hImage, "ptr", $pGUID, "uint", $iFrameIndex) If @error Then Return SetError(@error, @extended, False) If $aResult[0] Then Return SetError(10, $aResult[0], False) Return True EndFunc ;==>_GDIPlus_ImageSelectActiveFrame Edited April 29, 2016 by ViciousXUSMC TouchOdeath 1
TouchOdeath Posted August 9, 2016 Posted August 9, 2016 (edited) I'm posting something slightly deviated from the original intent of the OP just FYI. Thank you UEZ and ViciousXUSMC for the wonderful code. I cleaned up some of your main function, but took out the multipage aspect. I added the ability to convert tif to a different file format other than gif: TIFconvert("C:\somefile.tif") ;Tested filetypes: ;Working filetypes: png, gif, bmp, jpg/jpeg ;Not working filetypes: webp Func TIFconvert($sFile, $sFileType = "jpg") _GDIPlus_Startup() Local $sDrive, $sDir, $sFileName, $sExtension Local $aPathSplit = _PathSplit($sFile, $sDrive, $sDir, $sFileName, $sExtension) Local $aBitmaps = _GDIPlus_ImageLoadFromMultiPageImage($sFile) Local $iW = 0, $iH = 0 For $i = 1 To $aBitmaps[0] $iW += _GDIPlus_ImageGetWidth($aBitmaps[$i]) $iH = _GDIPlus_ImageGetHeight($aBitmaps[$i]) > $iH ? _GDIPlus_ImageGetHeight($aBitmaps[$i]) : $iH Next Local $hBitmap = _GDIPlus_BitmapCreateFromScan0($iW, $iH) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap) $iW = 0 For $i = $aBitmaps[0] To 1 Step -1 _GDIPlus_GraphicsDrawImageRect($hGfx, $aBitmaps[$i], $iW, 0, _GDIPlus_ImageGetWidth($aBitmaps[$i]), _GDIPlus_ImageGetHeight($aBitmaps[$i])) $iW += _GDIPlus_ImageGetWidth($aBitmaps[$i]) Next Local $sSave = $sDir & "\" & $sFileName & "." & $sFileType ;_GDIPlus_ImageRotateFlip($hBitmap, 6) _GDIPlus_ImageSaveToFile($hBitmap, $sSave) _GDIPlus_GraphicsDispose($hGfx) _GDIPlus_BitmapDispose($hBitmap) For $i = 1 To $aBitmaps[0] _GDIPlus_BitmapDispose($aBitmaps[$i]) Next _GDIPlus_Shutdown() EndFunc ;==>TIFconvert Of course if your doing other GDI+ things outside this function, you won't want to embed startup and shutdown inside the function. Edited August 9, 2016 by TouchOdeath
haijie1223 Posted March 6, 2019 Posted March 6, 2019 @UEZ How can I convert multiple jpg files into multi-page tiff files?
haijie1223 Posted March 6, 2019 Posted March 6, 2019 @TouchOdeathHow can I convert multiple jpg files into multi-page tiff files?
UEZ Posted March 6, 2019 Posted March 6, 2019 (edited) On 3/6/2019 at 3:23 PM, haijie1223 said: @UEZ How can I convert multiple jpg files into multi-page tiff files? Expand Or look in the help file for the example of: _GDIPlus_ImageSaveAddImage Edited March 6, 2019 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
haijie1223 Posted March 8, 2019 Posted March 8, 2019 @UEZHello,UEZ。 The multi-page tif file which created by this code size larger than the all single-page tiff files total size.other software write with the libtiff library, the size is not increased。how to solve this problem?
rudi Posted March 8, 2019 Posted March 8, 2019 Hello, For spliting multipage TIF to single page TIF I use IrfanView. For that customer it's only FaxG4 encoded TIF files, CAD drawings, but maybe this is an aditional approach worth taking a look at, for you? expandcollapse popup$MultiTifDir=@ScriptDir $ExtractDir = $MultiTifDir & "\Multi-TIF-Extracted" DirCreate($ExtractDir) $I_VIEW="C:\Program Files (x86)\IrfanView\i_view32.exe" if not FileExists($I_VIEW) Then MsgBox(48,"Fehler - IRFAN fehlt (32bit)","Dieses Script benötigt die Installation von Irfan View (32-bit Version auf 64-bit Windows)" & @CRLF & _ "Nicht gefunden wurde:" & @CRLF & _ $I_VIEW) Exit EndIf $s = FileFindFirstFile($MultiTifDir & "\*.tif") if $s = -1 Then MsgBox(0,"Fehler","Keine TIF Dateien gefunden im Verzeichnis" & @CRLF & _ $MultiTifDir) FileClose($s) Exit EndIf $Count=0 while 1 $next=FileFindNextFile($s) if @error Then FileClose($s) MsgBox(0,"fertig","Es wurden " & $Count & " TIF Dateien verarbeitet." & @CRLF & _ "Die Resultate liegen im Unterordner ""Extracted"".") ShellExecute($ExtractDir) Exit ElseIf @extended Then ContinueLoop Else SplitTIF($MultiTifDir & "\" & $next) $Count+=1 EndIf WEnd Func SplitTIF($_FullPathFileName) $params = $_FullPathFileName & " /extract=(" & $ExtractDir & ",tif) /cmdexit" ShellExecute($I_VIEW, $params) EndFunc ;==>SplitTIF Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
UEZ Posted March 8, 2019 Posted March 8, 2019 (edited) On 3/8/2019 at 10:32 AM, haijie1223 said: @UEZHello,UEZ。 The multi-page tif file which created by this code size larger than the all single-page tiff files total size.other software write with the libtiff library, the size is not increased。how to solve this problem? Expand Try something like this here: expandcollapse popup#include <GDIPlus.au3> CreateMultiFrameTIFF(@MyDocumentsDir & "\GDIPlus_MultiFrame.tif") ShellExecute(@MyDocumentsDir & "\GDIPlus_MultiFrame.tif") Func CreateMultiFrameTIFF($sFile, $iPages = 4) _GDIPlus_Startup() Local $sImgCLSID = _GDIPlus_EncodersGetCLSID("tif") ;create CLSID for a TIFF image file type ;Create main image Local $hImage = _GDIPlus_BitmapCreateFromScan0(400, 300) Local $hContext = _GDIPlus_ImageGetGraphicsContext($hImage) _GDIPlus_GraphicsClear($hContext, 0xFFFFFFFF) _GDIPlus_GraphicsDrawRect($hContext, 5, 5, 390, 290) _GDIPlus_GraphicsDrawString($hContext, "MultiFrame TIFF" & @CRLF & "Frame " & 1 & "/" & $iPages, 20, 20, "ARIAL", 32) _GDIPlus_GraphicsDispose($hContext) ;Save main image (first frame) and add MultiFrame-Param Local $tParamData = DllStructCreate("int data;int colordepth;int compression") $tParamData.data = $GDIP_EVTMULTIFRAME $tParamData.colordepth = 4 $tParamData.compression = $GDIP_EVTCOMPRESSIONLZW ;$GDIP_EVTCOMPRESSIONCCITT3; $GDIP_EVTCOMPRESSIONCCITT4 ;$GDIP_EVTCOMPRESSIONRLE; $GDIP_EVTCOMPRESSIONRLE ;$GDIP_EVTCOMPRESSIONNONE Local $tParams = _GDIPlus_ParamInit(3) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tParamData, "Data")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOLORDEPTH, 1, $GDIP_EPTLONG, DllStructGetPtr($tParamData, "ColorDepth")) _GDIPlus_ParamAdd($tParams, $GDIP_EPGCOMPRESSION, 1, $GDIP_EPTLONG, DllStructGetPtr($tParamData, "Compression")) _GDIPlus_ImageSaveToFileEx($hImage, $sFile, $sImgCLSID, $tParams) ;Create & save next frames Local $hImage_SubPage For $i = 2 To $iPages $hImage_SubPage = _GDIPlus_BitmapCreateFromScan0(400, 300) $hContext = _GDIPlus_ImageGetGraphicsContext($hImage_SubPage) _GDIPlus_GraphicsClear($hContext, 0xFFFFFFFF) _GDIPlus_GraphicsDrawRect($hContext, 5, 5, 390, 290) _GDIPlus_GraphicsDrawString($hContext, "MultiFrame TIFF" & @CRLF & "Frame " & $i & "/" & $iPages, 20, 20, "ARIAL", 32) _GDIPlus_GraphicsDispose($hContext) ;add frame to file _GDIPlus_ImageSaveAddImage($hImage, $hImage_SubPage, $tParams) ;dispose curent frame bitmap _GDIPlus_BitmapDispose($hImage_SubPage) Next ;Close the multiframe file. $tParamData.data = $GDIP_EVTFLUSH $tParams = _GDIPlus_ParamInit(1) _GDIPlus_ParamAdd($tParams, $GDIP_EPGSAVEFLAG, 1, $GDIP_EPTLONG, DllStructGetPtr($tParamData, "Data")) _GDIPlus_ImageSaveAdd($hImage, $tParams) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() EndFunc ;==>CreateMultiFrameTIFF I modified the example from the help file a little bit. Try different compression settings and bit depth (2, 4, 8, 16, 24, 32). Edited March 8, 2019 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
haijie1223 Posted March 10, 2019 Posted March 10, 2019 @UEZThanks,I found the compression is an important reason
emendelson Posted April 21, 2023 Posted April 21, 2023 I've been trying to adapt this code to convert a single-page TIFF to PNG, without success. I'll keep trying, but I wonder if anyone has adapted this code for single-page files?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now