Thank you Sannyasin and Keisuke, for sharing the process in converting the
picture library for v16.
However, my results are not good.
Upon opening our system in v16 and going to Pictures almost everything
displays as a camera wtih a red X across it and .pict underneath the X.
After converting each .pict into .png I get a very small version of the
same image except the .pict seems to have been replaced with .png.
And if I leave out the TRANSFORM PICTURE line it does nothing.
Any ideas would be appreciated!
I am converting from v13 if that makes a difference.
Thanks,
Alan

PICTURE LIBRARY LIST(arPicRefs;arPicNames)
For ($el;1;Size of array(arPicRefs))
$picRef:=arPicRefs{$el}
$picName:=arPicNames{$el}
GET PICTURE FROM LIBRARY($picRef;$picture)
GET PICTURE FORMATS($picture;$arCodecIDs)
If ($arCodecIDs{1}=".pict")
CONVERT PICTURE($picture;".png")
TRANSFORM PICTURE($picture;Transparency;"0x00FFFFFF")
SET PICTURE TO LIBRARY($picture;$picRef;$picName)
End if
End for



On Mon, May 29, 2017 at 5:00 AM, Sannyasin Siddhanathaswami via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Thanks Keisuke Miyako!
>
> That’s exactly what I needed.
>
> So I basically do this:
> PICTURE LIBRARY LIST
> loop through each picture and GET PICTURE FROM LIBRARY
> use GET PICTURE FORMATS to detect if it is a PICT
> if the picture is a PICT,
> CONVERT PICTURE to PNG
> TRANSFORM PICTURE to add transparency
> SET PICTURE TO LIBRARY to save it back
>
>
> That’s pretty easy. Thanks again!
>
>
>
> Sannyasin Siddhanathaswami
>
> On May 28, 2017, 10:31 PM -1000, wrote:
>
> I would recommended converting the source pictures inside the library,
> from PICT to PNG.
> there is nothing wrong with using the picture library, you can consider
> resource files in new development.
>
> so, take a 32-bit v16,
> iterate all pictures in your picture library,
> use GET PICTURE FORMATS to detect PICT,
> CONVERT PICTURE to PNG,
> (optionally) TRANSFORM PICTURE to add transparency,
> then save back to the library using the same name/ID.
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
>
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to