Tim, nice piece if code that I was hoping to use to convert my PICT library images to PNG…. This works perfectly but it must be done BEFORE you convert the structure to v17. I hope this helps someone.
Regards, Robert > On Feb 10, 2018, at 4:28 PM, Tim Nevels via 4D_Tech <[email protected]> > wrote: > > This method converts all pictures in the library to PNG format and then > writes them back to the library. It’s an example to see the logic that you > would use. > > C_TEXT($pictureName_t) > C_PICTURE($picture_c) > C_LONGINT($i;$pictureID_l) > ARRAY LONGINT($pictureID_al;0) > ARRAY TEXT($pictureName_at;0) > > PICTURE LIBRARY LIST($pictureID_al;$pictureName_at) > > For ($i;1;Size of array($pictureID_al)) > $pictureID_l:=$pictureID_al{$i} > $pictureName_t:=$pictureName_at{$i} > GET PICTURE FROM LIBRARY($pictureID_l;$picture_c) > > // convert the picture > CONVERT PICTURE($picture_c;".png") > > // make all white pixels transparent > TRANSFORM PICTURE($picture_c;Transparency;0x00FFFFFF) > > // write back to library > SET PICTURE TO LIBRARY($picture_c;$pictureID_l;$pictureName_t) > End for ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

