Re: post-icon conversion
4D Tech mailing list wrote > FYI, the find is working, but the replace is not. The ID's stay negative > even though I tell 4D to replace them without the negative. Unfortunaly,yes, you're right. I remember having written a method to do that by code, and not working at all. I got confirmation later on the forum that wasn't possible by code This is why I said, until V18 where we should be able to manipulate flat files, we have to do that one by one 'a la mano' Patrick - Patrick EMANUEL Administrator www.association-qualisoft.eu (Soft1002, Simply Asso & QS_Toolbox) -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
FYI, the find is working, but the replace is not. The ID's stay negative even though I tell 4D to replace them without the negative. On Fri, Oct 11, 2019 at 5:36 AM Patrick Emanuel via 4D_Tech < 4d_tech@lists.4d.com> wrote: > Waiting V18 to manipulate project files which for some will be flat format > could be a solution for someone whose want to deliver an application in V18 > For the others which are not able to move to v18 for some reasons (client > doesn't change system version, ), they have to do that 'manually', one > by one. I don't say that is good to stay, but market is there and has it > own > contraints. > > Patrick > > > > - > Patrick EMANUEL > > Administrator > www.association-qualisoft.eu > (Soft1002, Simply Asso & QS_Toolbox) > -- > Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** -- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
Waiting V18 to manipulate project files which for some will be flat format could be a solution for someone whose want to deliver an application in V18 For the others which are not able to move to v18 for some reasons (client doesn't change system version, ), they have to do that 'manually', one by one. I don't say that is good to stay, but market is there and has it own contraints. Patrick - Patrick EMANUEL Administrator www.association-qualisoft.eu (Soft1002, Simply Asso & QS_Toolbox) -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
@patrick, might it be worth it to wait until we can manipulate project files? I see that project files auto-export the image library. Since we would have plain text files in a project, wouldn't I then be able to iterate via and update everything? On Mon, Oct 7, 2019 at 10:58 AM Mike Kerner wrote: > good idea. they are mostly sequential because i was using mostly the 4d > stock button icons. > > On Mon, Oct 7, 2019 at 10:43 AM Chip Scheide via 4D_Tech < > 4d_tech@lists.4d.com> wrote: > >> no yo can't use a wild card... >> but >> if your library IDs are in sequential (or nearly) order you might be >> able to search for say: >> -12 >> to cover 120-129, 1200-1299, 12000-12999, etc >> >> On Mon, 7 Oct 2019 10:31:39 -0400, Mike Kerner via 4D_Tech wrote: >> > can i use wildcards with that search? you'd have to run it for every >> icon >> > id. >> > after going through all these forms, it seems like 60% are broken this >> way, >> > but the others are not. it also seems like the newer forms are ok, but >> the >> > older ones are the ones that have the issue. perhaps this was a v2/v3 >> > thing? >> > dang i wrote this a really long long time ago. >> > ** >> > 4D Internet Users Group (4D iNUG) >> > Archive: http://lists.4d.com/archives.html >> > Options: https://lists.4d.com/mailman/options/4d_tech >> > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com >> > ** >> --- >> 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:4d_tech-unsubscr...@lists.4d.com >> ** > > > > -- > 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." > -- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
good idea. they are mostly sequential because i was using mostly the 4d stock button icons. On Mon, Oct 7, 2019 at 10:43 AM Chip Scheide via 4D_Tech < 4d_tech@lists.4d.com> wrote: > no yo can't use a wild card... > but > if your library IDs are in sequential (or nearly) order you might be > able to search for say: > -12 > to cover 120-129, 1200-1299, 12000-12999, etc > > On Mon, 7 Oct 2019 10:31:39 -0400, Mike Kerner via 4D_Tech wrote: > > can i use wildcards with that search? you'd have to run it for every > icon > > id. > > after going through all these forms, it seems like 60% are broken this > way, > > but the others are not. it also seems like the newer forms are ok, but > the > > older ones are the ones that have the issue. perhaps this was a v2/v3 > > thing? > > dang i wrote this a really long long time ago. > > ** > > 4D Internet Users Group (4D iNUG) > > Archive: http://lists.4d.com/archives.html > > Options: https://lists.4d.com/mailman/options/4d_tech > > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > > ** > --- > 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:4d_tech-unsubscr...@lists.4d.com > ** -- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
no yo can't use a wild card... but if your library IDs are in sequential (or nearly) order you might be able to search for say: -12 to cover 120-129, 1200-1299, 12000-12999, etc On Mon, 7 Oct 2019 10:31:39 -0400, Mike Kerner via 4D_Tech wrote: > can i use wildcards with that search? you'd have to run it for every icon > id. > after going through all these forms, it seems like 60% are broken this way, > but the others are not. it also seems like the newer forms are ok, but the > older ones are the ones that have the issue. perhaps this was a v2/v3 > thing? > dang i wrote this a really long long time ago. > ** > 4D Internet Users Group (4D iNUG) > Archive: http://lists.4d.com/archives.html > Options: https://lists.4d.com/mailman/options/4d_tech > Unsub: mailto:4d_tech-unsubscr...@lists.4d.com > ** --- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
Hi, I really suggest you to export your library to a folder and to set this folder into your "ressources" folder. After that, redo the link with all pictures, unfortunally, must be done manually. At long terms, it is an investment because the day you have to update the picture, you just have to change it into this folder. If you also have a look, this way is more and more recommanded. Export the library is not the biggest part of the job and can be done in few secondes intead of the update. Have a look on QS_Toolbox, you have tools to help you to do that (export and located the pictures). Patrick - Patrick EMANUEL Administrator www.association-qualisoft.eu (Soft1002, Simply Asso & QS_Toolbox) -- Sent from: http://4d.1045681.n5.nabble.com/4D-Tech-f1376241.html ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
Yes, Find in Design followed by Replace in Content will work to fix the references. Tom > On Oct 7, 2019, at 07:25, Chip Scheide via 4D_Tech <4d_tech@lists.4d.com> > wrote: > > I do not know that this will work... > try Find in design for the negative library reference > > it you find it - you can then do a global replace > Chip > > On Mon, 7 Oct 2019 10:22:42 -0400, Mike Kerner via 4D_Tech wrote: >> Replacing the >> negative id with a positive id resets the reference, but that's a lot of >> buttons on a lot of forms to fix. > -- ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
can i use wildcards with that search? you'd have to run it for every icon id. after going through all these forms, it seems like 60% are broken this way, but the others are not. it also seems like the newer forms are ok, but the older ones are the ones that have the issue. perhaps this was a v2/v3 thing? dang i wrote this a really long long time ago. ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
Weirder and weirder this gets. These aren't picts. There's no "X" with "PICT" after running the conversion code. What I meant was that after I run the conversion code in 32 bit, the icons appear normally (as do the forms), but when I then open the structure in 64 afterward, they appear as a white background with red "Library Picture Not Found" (I had to blow the button up to read all the text instead of just the read "Library", even though in the library, they appear normally (so they're not picts any longer, no "X" with "PICT"). I don't remember why, but for some reason, all the icon references are negative (all these icon sets were created with the wizard way back when). In 32 bit, that doesn't break anything, but in 64, it does. Replacing the negative id with a positive id resets the reference, but that's a lot of buttons on a lot of forms to fix. ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
On Mon, 7 Oct 2019 05:58:05 -0700, Tom Benedict via 4D_Tech wrote: > > Also, if you have Static PICTs (not in the Picture Library) on forms, > you will need to update those manually. I found that older 4D created (form wizard) list forms (output forms) have a PICT (gradient) background image - it is simplest to just delete these. --- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
try this instead: TRANSFORM PICTURE($Pic_to_Convert;102) On Mon, 7 Oct 2019 08:42:53 -0400, Mike Kerner via 4D_Tech wrote: TRANSFORM PICTURE($Pict;Transparency;0x00FF) --- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
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 <4d_tech@lists.4d.com> > 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 < > 4d_tech@lists.4d.com> 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;0x00FF) // 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 <4d_tech@lists.4d.com> >> 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 < >> 4d_tech@lists.4d.com> 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:
Re: post-icon conversion
the new code (changing the transparency) doesn't fix it. ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
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 < 4d_tech@lists.4d.com> 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;0x00FF) // 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 <4d_tech@lists.4d.com> > 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 < > 4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com > ** -- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
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 < > 4d_tech@lists.4d.com> 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;0x00FF) // 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 <4d_tech@lists.4d.com> >> 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 < >> 4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com >> ** > 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
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 < 4d_tech@lists.4d.com> 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;0x00FF) // 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 <4d_tech@lists.4d.com> > 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 < > 4d_tech@lists.4d.com> 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:4d_tech-unsubscr...@lists.4d.com > ** -- 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
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;0x00FF) // 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 <4d_tech@lists.4d.com> > 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 <4d_tech@lists.4d.com> >> 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:4d_tech-unsubscr...@lists.4d.com **
Re: post-icon conversion
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 Chuck Miller Voice: (617) 739-0306 Informed Solutions, Inc. Fax: (617) 232-1064 mailto:cjmillerinformed-solutions.com Brookline, MA 02446 USA Registered 4D Developer Providers of 4D and Sybase connectivity http://www.informed-solutions.com This message and any attached documents contain information which may be confidential, subject to privilege or exempt from disclosure under applicable law. These materials are intended only for the use of the intended recipient. If you are not the intended recipient of this transmission, you are hereby notified that any distribution, disclosure, printing, copying, storage, modification or the taking of any action in reliance upon this transmission is strictly prohibited. Delivery of this message to any person other than the intended recipient shall not compromise or waive such confidentiality, privilege or exemption from disclosure as to this communication. > On Oct 4, 2019, at 10:05 PM, Mike Kerner via 4D_Tech <4d_tech@lists.4d.com> > 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:4d_tech-unsubscr...@lists.4d.com > ** ** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:4d_tech-unsubscr...@lists.4d.com **