you can apply the transparent option with having t convert from pict.
just modify the code to run through all the library pictures with out regard to 
picture type    

> tom,
> since i've already run the conversion, do i have to restore from a backup
> to do it again?
> i can't post images to the nug, right?
> 
> On Sat, Oct 5, 2019 at 10:46 PM Tom Benedict via 4D_Tech <
> [email protected]> wrote:
> 
>> Mike,
>> 
>> Here’s the method I use to convert the Picture Library. I believe I got
>> this from a 4D Tech Tip, but I’m not sure. It includes the call to
>> TRANSFORM PICTURE to make the background transparent which Chuck mentioned.
>> I don’t recall a red “Library” on the icons prior to running this 
>> method,
>> so I don’t know for sure whether it will solve your issue.
>> 
>>   // Method: Convert_Picture_Library_Tom
>>   // ----------------------------------------------------
>>   // User name (OS): Tom Benedict
>>   // Date and time: 7/10/2019, 14:03:11
>>   // ----------------------------------------------------
>>   // Description
>>   // Note: This method will find and update any images in the Picture
>> Library  in PICT format
>>   //           which are not compatible with 64bit.
>>   // Note: !!! This method must be run in 32bit. !!!
>>   //
>> C_LONGINT($i;$SOA;$RIS;$PictRef)
>> C_TEXT($PictName)
>> C_PICTURE($Pict)
>> 
>> If (Version type ?? 64 bit version)  // running in 64bit
>>           // do nothing. Must be run in 32bit
>> Else
>>           //------------ initialize arrays ------------------
>>         ARRAY LONGINT($aL_PictRef;0)
>>         ARRAY TEXT($aT_PictName;0)
>>         ARRAY TEXT($at_Codecs;0)
>>         PICTURE LIBRARY LIST($aL_PictRef;$aT_PictName)
>>         $SOA:=Size of array($aL_PictRef)
>> 
>>           //------------ convert PICT to png ------------------
>>         If ($SOA>0)
>>                 For ($i;1;$SOA)  // for each image
>>                         $PictRef:=$aL_PictRef{$i}
>>                         $PictName:=$aT_PictName{$i}
>>                         GET PICTURE FROM LIBRARY($aL_PictRef{$i};$Pict)
>>                         GET PICTURE FORMATS($Pict;$at_Codecs)
>>                         For ($j;1;Size of array($at_Codecs))
>>                                 If ($at_Codecs{$j}=".pict")  // if the
>> format is obsolete
>>                                         CONVERT PICTURE($Pict;".png")  //
>> conversion to png
>>                                         TRANSFORM
>> PICTURE($Pict;Transparency;0x00FFFFFF)  // make the background transparent
>>                                           // and store in library
>>                                         SET PICTURE TO
>> LIBRARY($Pict;$PictRef;$PictName)
>>                                 End if
>>                         End for
>>                 End for
>>         Else
>>                 ALERT("The image libary is empty.")
>>         End if
>> End if
>>   //------------ end of method ------------------
>> 
>> HTH,
>> 
>> Tom Benedict
>> 
>>> On Oct 5, 2019, at 16:56, Chuck Miller via 4D_Tech <[email protected]>
>> wrote:
>>> 
>>> When you converted them did you make sure to deal with the background. I
>> have posted on this before. I will try and remember and repost on Monday
>> what the command is to set the background properly
>>> 
>>> Regards
>>> 
>>> Chuck
>>> 
>> ------------------------------------------------------------------------------------------------
>>>> On Oct 4, 2019, at 10:05 PM, Mike Kerner via 4D_Tech <
>> [email protected]> wrote:
>>>> 
>>>> We got a project moved from 2k4 to 17, and got the icons converted.
>> They
>>>> appear as one would expect in the picture library.  However, the buttons
>>>> that use them now display a white background and the red word "Library".
>>>> If I create a new picture button and assign the same ID, the image
>>>> appears correctly.
>>>> What do I have to do to get 4D to refresh or reload or whatever to load
>>>> these images into the old buttons?
>>>> 
>> 
>> **********************************************************************
>> 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]
>> **********************************************************************
> 
------------
Hell is other people 
     Jean-Paul Sartre
**********************************************************************
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]
**********************************************************************

Reply via email to