Announcement

Collapse
No announcement yet.

Width and height of a given jpg or gif filename in pixels

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Width and height of a given jpg or gif filename in pixels

    Hello,

    I'm looking for a function that can return the width and height of a given jpg or gif filename in pixels.

    I don't think there is a builtin PowerBASIC function to do that.

    Any ideas ?

    Thanks.
    Jean-Pierre
    Last edited by Jean-Pierre LEROY; 5 Apr 2009, 08:58 AM.
    Jean-Pierre LEROY

  • #2
    Hi Jean-Pierre,

    Are you still using Jose's controls which are based on Patrice's GDIPlus code? If you are then look in the include file for functions such as: GdipLoadImageFromFile, GdipGetImageWidth, and GdipGetImageHeight.

    Basically, load the image from the file and then pass that handle to the Width and/or Height functions in order to get the values.
    Paul Squires
    FireFly Visual Designer (for PowerBASIC Windows 10+)
    Version 3 now available.
    http://www.planetsquires.com

    Comment

    Working...
    X