Chip,
Try this: I know v13 doesn’t have the Transparency constant, so not sure which
version of 4D it comes into play, but this was part of one of the conversion
routines I ran into a while ago when I had to do this:
TRANSFORM PICTURE($Pict_G;Transparency;0x00FFFFFF) //convert the WHITE to
Transparent
Randy
----------------------------------------------------------------------
Randy Jaynes
Senior Programmer and Customer Support
http://printpoint.com • 845.687.3741 • PrintPoint, Inc • 57 Ludlow Lane •
Palisades, NY 10964
Please send all email contacts to [email protected]
<mailto:[email protected]>
> On Oct 8, 2018, at 11:19 AM, Chip Scheide via 4D_Tech <[email protected]>
> wrote:
>
> I have done this, although in v13. I found that all my images now have
> white backgrounds
> any way to fix this without manually editing every single one??
>
> On Mon, 8 Oct 2018 08:12:44 -0700, Kirk Brooks via 4D_Tech wrote:
>> I'm preparing to move a large, established project from v15 to v17 and
>> finally had to deal with the pictures. I've been putting this off at least
>> partly because of just not wanting to deal with this. Turns out it's not
>> that big a deal, at least for me.
>>
>> When I've just done the conversion to see what happened lots of old forms,
>> the ones 4D creates, had the dreaded red X in the button icons. Most of my
>> forms were fine because for a long time I've been using icons from the
>> resource folder which were already .png. But I still had to do something
>> about the legacy images.
>>
>> 1) converting the picture library
>> This was really easy. As numerous folks have pointed out this is where to
>> start:
>>
>> http://kb.4d.com/assetid=76775
>>
>> I don't have 4D Pack installed any more and didn't see an easy, native way
>> of determining what kind of file a picture library resource is. But then I
>> realized I really don't care what they were because I was going to make
>> them all .png now. So I modified the loop to simply convert all the images
>> to .png.
>>
>> I did this in the v15 version.
>>
>> 2) the outliers
>> A number of forms have static images in them. This illustrated the various
>> strategies 4D has used over the years for building the default forms. I
>> didn't pay enough attention to determine which versions did what but some
>> forms have static images as backgrounds that are incompatible and some
>> don't.
>>
>> I quickly noticed lots of them were named "Picture6". Doing a find in
>> design located all the forms with "Picture6" and opened each one deleting
>> the obsolete image. Sometimes the image was OK. None of these forms are
>> user-facing so they don't really matter but the point is it's easy to find
>> them and relatively quick to delete them.
>>
>> Bottom line - this wasn't nearly as painful or time consuming a deal as I
>> feared.
>>
>> Unexpected discovery - the picture library is still a useful thing!
>>
>> I had equated the library with .pict files and stopped paying attention to
>> it. This isn't the case and the tools for managing what's in the library
>> are simple to use. You can't edit images directly anymore (that's way gone)
>> but storing .png files is a snap and for me a lot easier than managing them
>> from Resources.
>>
>> It's also easier if you have a large collection of icons but only use a
>> few. I have a set of icons I like and use but there are hundreds of them in
>> my development resources folder. I don't want to include all of them in
>> deployed databases so I have this method that loops all the forms and all
>> the objects making a list of the ones I actually use and then creating a
>> subset folder of just those icons for shipping. It's a PITA.
>>
>> I am going to be changing that so I'll loop through all the form objects as
>> now but if I refer to a file in my icons folder I'll put a copy of that
>> icon in the library and change the ref in the object. This way I will be
>> able to refer to the full icon set during development but not ship it.
>>
>> --
>> Kirk Brooks
>> San Francisco, CA
>> =======================
>>
>> *We go vote - they go home*
>> **********************************************************************
>> 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]
>> **********************************************************************
> ---------------
> Gas is for washing parts
> Alcohol is for drinkin'
> Nitromethane is for racing
> **********************************************************************
> 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]
**********************************************************************