ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 IETIFFHandler.GetPagesCount return 0 in 64 bits

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
jfernandez Posted - Nov 08 2019 : 06:15:40
Hi, i'm having some problems with the 64 bits version.
The next code return zero pages at load a TIFF document


 Private Function pGetPagesCount(ByRef Image As MemoryStream, Format As IEFileFormats) As Integer
        Dim Pages As Integer
        Dim IEM As IEImageList = Nothing
        Dim IETifH As IETIFFHandler = Nothing  
        Try
            Select Case Format
                Case IEFileFormats.TIFF
                    IETifH = New IETIFFHandler
                    IETifH.Read(Image)
                    Pages = IETifH.GetPagesCount
                    IETifH.FreeData()
                Case IEFileFormats.GIF
                    IEM = New IEImageList
                    IEM.LoadImages(Image, Format)
                    Pages = IEM.ImageCount
                    IEM.Clear()
                Case Else
                    Pages = 1
            End Select
        Catch ex As Exception
            Throw New Exception("GetPagesCount: " & ex.Message)
        Finally
            If IEM IsNot Nothing Then
                IEM.Dispose()
                IEM = Nothing
            End If
            If IETifH IsNot Nothing Then IETifH = Nothing
        End Try
        Image.Seek(0, SeekOrigin.Begin)
        Return Pages

    End Function


Can you help me?

Thanks in advance
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Nov 08 2019 : 21:17:21
Hi

This works fine when I test it in 8.7.5, 32 and 64bit.

procedure Tfmain.BtnTestClick(Sender: TObject);
var
  IETifH : TIETIFFHandler;
begin
  IETifH := TIETIFFHandler.Create;
  IETifH.ReadFile( 'D:\Testing_Multimedia\TIFF\multipage-DP1076975.tif' );
  ShowMessage( IntToStr( IETifH.GetPagesCount ));
  IETifH.Free;
end;


Please email me the TIFF file.

Nigel
Xequte Software
www.imageen.com