Page 3 of 5

Re: ImagePlugin Module (UseWindowsImageDecoder / Encoder)

Posted: Fri Sep 02, 2016 7:52 pm
by walbus
Now, i have more free time and have tested again.
All works for me fine and worry free.
No more problems with broken PNG pictures !
Absolutely simple to use and fast !
Tested with giga pixel pictures, broken PNG's and many other different pictures

Again wilbert, many thanks for this fine work !

Re: ImagePlugin Module (UseWindowsImageDecoder / Encoder)

Posted: Sat Sep 03, 2016 6:45 am
by wilbert
walbus wrote:Tested with giga pixel pictures, broken PNG's and many other different pictures
Thanks for testing :)

Re: ImagePlugin Module (UseWindowsImageDecoder / Encoder)

Posted: Sat Sep 03, 2016 4:56 pm
by wilbert
I uploaded a new version with changed functions names.
It's now UseSystemImageDecoder() / UseSystemImageEncoder()
This allows me to make the module cross platform.

Re: ImagePlugin Module (UseSystemImageDecoder / Encoder)

Posted: Sat Sep 03, 2016 6:10 pm
by walbus
This allows me to make the module cross platform.
Wow !

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 11:33 am
by wilbert
I posted a large update of the module.
It's cross platform now. :)
Please test it and report any problems.

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 12:45 pm
by djes
Just great ! Thank you :)

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 1:41 pm
by bbanelli
Works perfectly (incorporated in pretty large project with few hundred PNG icons).

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 1:55 pm
by walbus
Full feature test with Windows and Linux.
All works fine, incredible, the best i have see a long time !

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 2:26 pm
by Keya
NOTHING SHORT OF BRILLIANT!!! I've been pursuing other options for transparent images for quite a while (its perhaps silly or OCDish of me to feel this way in 2016 but the ~200kb PNG lib often feels to me excessive for my <100kb apps) - native options in Linux and custom raw image format to name just two ... both of which are essentially now redundant by this slick multi-OS native image wrapper!!! :) :) :)
I just wish i had more time at the moment to give it the thorough testing out it deserves but both Decode & Encode demos are working sweet in my old XP-32! will certainly get around to testing it out more properly in due time

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 2:37 pm
by walbus
I use this new coders in my QUICK-AES-256 for picture steganographie, just now included, tested and ready all over.

Without problems the old PB coders deactivated and replaced with wilberts GDI+ routines.

For a last stepp i have now replaced the PB Linux Routines , i think in 5 minutes all was ready.

And it works very fine !

The executables are now about 600>700 kb smaller, this are more as 30% !

The new routines are very fast and can loading any pictures without ugly crashes the exe.

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 3:25 pm
by wilbert
Thanks for the feedback. :)
Good to know it is working on Linux and Window XP as well.
I don't have Windows XP or multiple Linux distros to test with. :wink:

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Mon Sep 05, 2016 4:08 pm
by walbus
This was the "Missing Link" wilbert.

For any users,
You can so test simple the coders :

Code: Select all

UseModule ImagePlugin
UseSystemImageDecoder()
UseSystemImageEncoder()

path$=OpenFileRequester("Load picture", path$, "", 0)
If path$
If LoadImage(1, path$)
  OpenWindow(0, 0, 0, ImageWidth(1), ImageHeight(1), "Image plugin example", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  ImageGadget(0, 0, 0, ImageWidth(1), ImageHeight(1), ImageID(1))
  Repeat
    Event=WaitWindowEvent()
  Until Event=#PB_Event_CloseWindow
  
  ; Encode as LZW compressed TIFF with 256 colors
 ; *Mem=EncodeImage(1, #SystemImagePlugin, #SystemImagePlugin_TIFF_LZW, 8)
  
  SaveImage(1, "test_tiff.tiff", #SystemImagePlugin, #SystemImagePlugin_TIFF_LZW)
  
  ; Save as jpeg with quality 70
  SaveImage(1, "test_jpg.jpg", #SystemImagePlugin, #SystemImagePlugin_JPEG | 70)
  SaveImage(1, "test_png.png", #SystemImagePlugin, #SystemImagePlugin_PNG)
  SaveImage(1, "test_gif.gif", #SystemImagePlugin, #SystemImagePlugin_GIF)
  SaveImage(1, "test_bmp.bmp", #SystemImagePlugin, #SystemImagePlugin_BMP)
EndIf
EndIf

ModuleImagePluginStop()

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Tue Sep 06, 2016 6:00 am
by wilbert
I posted a small update which improves the decode of transparent images on Mac.
If you are only using Windows or Linux, there's no need to update as nothing has changed for those.

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Tue Sep 06, 2016 6:20 am
by J. Baker
This is very nice. Thanks for making it cross platform! :D

Your code only: 28.5kb executable on XP! :D

Re: ImagePlugin Module (Cross platform multi format de-/enco

Posted: Fri Sep 09, 2016 2:19 pm
by Keya
confirmed encoder + decoder both working fine in my Windows XP 32, Windows 7 64, Linux Mint 32, Linux Mint 64, and OSX El Capitan 64. Has anyone been able to test on Windows 10? my W10 VM needs a makeover so i cant test atm