PxPlus User Forum

Twitter Twitter Twitter

Author Topic: provide many PNGs to WindX  (Read 2201 times)

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 177
    • View Profile
provide many PNGs to WindX
« on: October 05, 2018, 10:24:22 AM »
We're going to redesign the front ends of our applications, which will require many PNGs. In order to reduce network traffic I'm looking for a way to put these files into a container file (DLL, ZIP or whatsoever), copy it to the client and use them from within that container.
I tried *plus/dll/maint without avail. As this tool cannot open oldimages.dll, I have doubts whether that will work.

What options are available with SCS and PxPlus V14?

chrisk

  • Member
  • **
  • Posts: 14
    • View Profile
Re: provide many PNGs to WindX
« Reply #1 on: October 05, 2018, 12:09:58 PM »
Modern versions of PvxPlus have built in zip library handling capabilities. Using those tools, you could do something like this:

1) run a server side program that creates a zip file containing your images

2) transmit the zip file to the client

3) call a client side program to extract the images from the zip file and place them where needed for your application

Keep in mind, this is mainly helpful on slow networks.  The compress/uncompressed time is often burdensome when running on a fast network.



Chris Kukuchka
Sequoia Group, Inc.

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: provide many PNGs to WindX
« Reply #2 on: October 05, 2018, 01:40:28 PM »
The PNG image format is a compressed image format. This means it is already compressed and putting it in a zip file will give you very little extra compression. I just did a test here and a 349kb png zipped to a 329kb.

Your best option is probably to take advantage of the WindX auto download feature have the the system automatically copy the images to the client system for you and not worry about compression as the images are already compressed.

Details on the auto download feature can be found here https://manual.pvxplus.com/?windx/autoload.htm
Principal Software Engineer for PVX Plus Technologies LTD.

Thomas Bock

  • Diamond Member
  • *****
  • Posts: 177
    • View Profile
Re: provide many PNGs to WindX
« Reply #3 on: October 08, 2018, 06:57:33 AM »
The last time I tried the dynamic download, it didn't work for us, because we use the PNGs for buttons and the dynamic download only works for the 'PICTURE' mnemonic.
Hiding the numerous PNGs shall also be achieved. I've built a DLL consisting of those PNGs with *plus/dll/maint, but couldn't make it work. As it is possible to use the old icons with setdev (0) set "RESOURCELIB" to "oldimages.dll", there should be a way, but I cannot figure it out.

Peter.Higgins

  • Diamond Member
  • *****
  • Posts: 124
    • View Profile
Re: provide many PNGs to WindX
« Reply #4 on: October 08, 2018, 10:29:11 AM »
The static download to the clients works well for stuff that doesn't change often like button images and avoids repetitive network load.  Not answering your question, but I don't see a large upside to creating the dll for distribution or client loading given Austen's observation other than obscurring your graphics.

Devon Austen

  • Administrator
  • Diamond Member
  • *****
  • Posts: 382
  • Don’t Panic
    • View Profile
    • PVX Plus Technologies
Re: provide many PNGs to WindX
« Reply #5 on: October 09, 2018, 09:29:13 AM »
The WindX Auto Download I mentioned is actually two features: one is what you already tried the dynamic download, the other is static download. I think static download is more helpful in your case as you could have all your images in a directory and in the sync.conf file specify you want that directory synced. Thus a client system would always have that directory downloaded the first time it connects. If you ever update any of the images or add new images all the clients will get updated the next time they connect.

If you still want to go the DLL route you have to be aware of how PxPlus deal with resource DLLs. oldimages.dll is an internal use DLL you can't open it up and add your own images to it. You would need to create your own DLL with your images and name it PLUSLIB.DLL and put it in the same directory as the pxplus.exe. PxPlus requires that the first resource DLL must be named PLUSLIB.DLL. You can have a second resource DLL and name it what you want but then you have to tell PxPlus about it via the INI file or the 'OPTION' mnemonic. This is documented here https://manual.pvxplus.com/?pluslib1/sect1.1/c.htm

Principal Software Engineer for PVX Plus Technologies LTD.

Mike King

  • Diamond Member
  • *****
  • Posts: 3811
  • Mike King
    • View Profile
    • BBSysco Consulting
Re: provide many PNGs to WindX
« Reply #6 on: October 10, 2018, 12:10:20 PM »
As a point of clarification on PLUSLIB libraries;  These are Windows Resource library DLLs, and there is no PNG type of resource directly supported by Windows. 

When we create a DLL using PLUSLIB.DLL we place all data in the DLL as raw binary data and then treat the library as a collection of files.  For PNG files we rely on external utilities that expect to be able to directly read the PNG data from disk.
Mike King
President - BBSysco Consulting
eMail: mike.king@bbsysco.com