Hi Mike,

I don’t know for sure, because I have limited experience in this realm and 32 
vs 64 causes my brain to hurt, but I’m thinking that something about the 
conversion didn’t ‘take’ completely (or maybe not at all).

I’m just restating the obvious here, but in 32bit mode, PICT images display 
‘normally’ because they are supported by 4D. In 64bit mode, PICTs aren’t 
understood, so they are replaced by a red X and camera icon (in the case of 
’static’ PICTS on forms), or the red “Library” that you are seeing. 

I would recommend starting over with a structure which contains the Picture 
Library containing the PICT images. Run the conversion method in 32bit mode. 
Add a break point in the For loop so you can monitor which images are 
identified as PICT and are converted. That may help. Then open in 64bit and see 
what happens.

I had to do the process a few times to appreciate the details of the process.

Also, if you have Static PICTs (not in the Picture Library) on forms, you will 
need to update those manually.

HTH,

Tom Benedict

> On Oct 7, 2019, at 05:42, Mike Kerner via 4D_Tech <[email protected]> 
> wrote:
> 
> ok, this is weird.  if i open the structure in 32-bit, the buttons appear
> normal.
> 
> 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]
>> **********************************************************************
> 
> 
> 
> -- 
> On the first day, God created the heavens and the Earth
> On the second day, God created the oceans.
> On the third day, God put the animals on hold for a few hours,
>   and did a little diving.
> And God said, "This is good."
> **********************************************************************
> 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]
> **********************************************************************

**********************************************************************
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