lua-gd icon indicating copy to clipboard operation
lua-gd copied to clipboard

error: 'LgdImageCreateFromPng' undeclared (when no PNG support)

Open hhrhhr opened this issue 4 years ago • 0 comments

Compile fail when library builded without PNG support. Small patch fix this:

@@ -2168,8 +2168,10 @@ static const luaL_Reg LgdFunctions[] =
      { "createFromGif",          LgdImageCreateFromGif },
      { "createFromGifStr",       LgdImageCreateFromGifPtr },
  #endif
+ #ifdef GD_PNG
      { "createFromPng",          LgdImageCreateFromPng },
      { "createFromPngStr",       LgdImageCreateFromPngPtr },
+ #endif
      { "createFromGd",           LgdImageCreateFromGd },
      { "createFromGdStr",        LgdImageCreateFromGdPtr },

hhrhhr avatar Apr 10 '20 12:04 hhrhhr