It is currently Fri Jun 22, 2018 7:58 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: ImageFrameCount() returns 0
PostPosted: Fri Jun 01, 2018 5:55 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 213
The documentation says, "Returns the frame count of the image. If the image is not multi-frame, it will always return 1." However, on macOS it returns 0.
Code:
UsePNGImageDecoder()
requester_result$ = OpenFileRequester("", "", "", 0)
If requester_result$
  img = LoadImage(#PB_Any, requester_result$)
  Debug ImageFrameCount(img)
EndIf


Top
 Profile  
Reply with quote  
 Post subject: Re: ImageFrameCount() returns 0
PostPosted: Tue Jun 05, 2018 10:47 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 213
I just tested this on Ubuntu and it does the same, so is the documentation wrong and Windows is the one with the bug, or are the Linux and macOS versions the ones with the bug? :?


Top
 Profile  
Reply with quote  
 Post subject: Re: ImageFrameCount() returns 0
PostPosted: Wed Jun 06, 2018 9:08 am 
Offline
Administrator
Administrator

Joined: Fri May 17, 2002 4:39 pm
Posts: 13304
Location: France
It should return 1, I will take a look


Top
 Profile  
Reply with quote  
 Post subject: Re: ImageFrameCount() returns 0
PostPosted: Wed Jun 06, 2018 6:49 pm 
Offline
Addict
Addict

Joined: Wed Nov 12, 2008 5:01 pm
Posts: 997
Location: Russia
There is an error in the code.
wombats wrote:
UsePNGImageDecoder()
Multi-frame images only GIF.

_________________
Library XP_Menu_Lib - office menu; HID_Lib - USB Library
Torrent client - pbTorrent (source code); Create driver in PureBasic.


Top
 Profile  
Reply with quote  
 Post subject: Re: ImageFrameCount() returns 0
PostPosted: Wed Jun 06, 2018 10:44 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jun 25, 2014 5:25 pm
Posts: 220
Location: Germany
@User_Russian:
PB help wrote:
Returns the frame count of the image. If the image is not multi-frame, it will always return 1.

_________________
Image

PureBasic-CodeArchiv-Rebirth: Git-Repository / Download -- Any help is welcome!

Manjaro Xfce x64 (Main system) :: WindowsXP/Xubuntu x86 (VirtualBox) :: PureBasic (Linux: x86/x64, Windows: x86) :: All are up to date


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye