Picture Buttons in v16

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Picture Buttons in v16

4D Tech mailing list
Aloha,

I’m trying to make progress preparing our database for v16.

Thanks for the help a few months back converting old PICT files. Turns out, Convert Picture was crashing like crazy in v15.2, but works fine in 15.3… Hopefully that helps someone else trying to do the same.

Now I’m trying to convert picture buttons. A ton of our forms use them. Picture buttons with a source of “Picture Library” and an ID # are in the old format and don’t show with v16.1 64bit Mac version. If I change the “Source” to file and give a path to the resource folder “.png” version, it works fine.

Is there a simple way to convert all my buttons to a format that works? I can’t find anything in the conversion documentation.

Thanks,

Sannyasin Siddhanathaswami
**********************************************************************
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:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Picture Buttons in v16

4D Tech mailing list
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.

> 2017/05/29 17:13、Sannyasin Siddhanathaswami via 4D_Tech <[hidden email]> のメール:
>
> Now I’m trying to convert picture buttons. A ton of our forms use them. Picture buttons with a source of “Picture Library” and an ID # are in the old format and don’t show with v16.1 64bit Mac version. If I change the “Source” to file and give a path to the resource folder “.png” version, it works fine.
>
> Is there a simple way to convert all my buttons to a format that works? I can’t find anything in the conversion documentation.




**********************************************************************
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:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Picture Buttons in v16

4D Tech mailing list
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:[hidden email]
**********************************************************************