RE: Missing Pict - 64bit Removes pictures from library

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
FYI;

Been messing with 64bit v16r4

Found that most (not all) of my PICTURE LIBRARY pictures went south.

If I open the app in the 32 bit version, they are all still there.

So... what Christian said below, is more than a "good idea"

Not looking forward to redoing all of these pictures into the resources folder and then finding all references to them.

Arrrgghhh!

πŸ˜‰

Randy Engle, Director
XC2 Software LLC – XC2LIVE!
mailto:  [hidden email]
PH:  800.761.4999 – 415.456.9200


-----Original Message-----
From: 4D_Tech [mailto:[hidden email]] On Behalf Of Christian Sakowski
Sent: Thursday, January 26, 2017 6:29 AM
To: 4D iNug Technical <[hidden email]>
Subject: Re: Missing Pict

> SET PICTURE TO LIBRARY($vpPict;$vPictRef;$vPictName)

FYI: Never use the library anymore. It's obsolete since v11. You have to use the Resources-Folder.


**********************************************************************
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
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
> Found that most (not all) of my PICTURE LIBRARY pictures went south.

Did you migrate you pictures to png or some other supported type?

There is a cool update tool that JPR wrote to help you update your images. It was demonstrated at the last road show.


Neil








--

Privacy Disclaimer: This message contains confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this email. Please delete this email from your system and notify the sender immediately by replying to this email.  If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.

The Alternative Investments division of UMB Fund Services provides a full range of services to hedge funds, funds of funds and private equity funds.  Any tax advice in this communication is not intended to be used, and cannot be used, by a client or any other person or entity for the purpose of (a) avoiding penalties that may be imposed on any taxpayer or (b) promoting, marketing, or recommending to another party any matter addressed herein.
**********************************************************************
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
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Randy,

All our images, which currently is almost 1000 (for buttons, forms, etc..) are stored in the Resources folder.  Here is how we access them:

     $image_path:=Get 4D folder(Current resources folder)+"Images\\"

Pretty easy to access the folder, all you need to know from this point is the name of the image.  We have a very specific naming convention based upon how it's used, just to make things easier to organize.

BTW, all our images are PNG files...

Best,


Steve

-----Original Message-----
From: 4D_Tech [mailto:[hidden email]] On Behalf Of Randy Engle via 4D_Tech
Sent: Wednesday, August 09, 2017 2:00 PM
To: '4D iNug Technical' <[hidden email]>
Cc: Randy Engle <[hidden email]>
Subject: RE: Missing Pict - 64bit Removes pictures from library

FYI;

Been messing with 64bit v16r4

Found that most (not all) of my PICTURE LIBRARY pictures went south.

If I open the app in the 32 bit version, they are all still there.

So... what Christian said below, is more than a "good idea"

Not looking forward to redoing all of these pictures into the resources folder and then finding all references to them.

Arrrgghhh!

πŸ˜‰

Randy Engle, Director
XC2 Software LLC – XC2LIVE!
mailto:  [hidden email]
PH:  800.761.4999 – 415.456.9200

**********************************************************************
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
|  
Report Content as Inappropriate

Re: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Randy,

You can use 4D commands to figure out where these are used. I wrote a utility routine to track down things like this and where some formats are used so I could flush out the ones that aren’t in the Filters list in the Toolbox.

You should be able to find what you’re looking for using the commands
        FORM GET OBJECTS
        OBJECT Get Type
        OBJECT Get format

These will let you get a list of objects on the form, loop through them, and check the objects.

I found that objects from my picture library have a format like
        ?6909
        ?162
        ?32741
       
Objects that are pictures from our Resources folder have a format like
        #images/Print_16x16.png
        #images/magnify_blue_16x64.png

I have a method that I can call from a button on a form to dump everything on it, and then another method that will loop through all project forms and table forms to create a big dump file of the entire database.

Handy for tracking all the uses of these things so I can get them converted as we need.

Would love to get the handy JPR tool that Neil mentioned to see what that does.

HTH,
Randy

----------------------------------------------------------------------
Randy Jaynes
Senior Programmer and Customer Support

http://printpoint.com β€’ 845.687.3741 β€’ PrintPoint, Inc β€’ 57 Ludlow Lane β€’ Palisades, NY 10964





> On Aug 9, 2017, at 3:00 PM, Randy Engle via 4D_Tech <[hidden email]> wrote:
>
> FYI;
>
> Been messing with 64bit v16r4
>
> Found that most (not all) of my PICTURE LIBRARY pictures went south.
>
> If I open the app in the 32 bit version, they are all still there.
>
> So... what Christian said below, is more than a "good idea"
>
> Not looking forward to redoing all of these pictures into the resources folder and then finding all references to them.
>
> Arrrgghhh!
>
> πŸ˜‰
>
> Randy Engle, Director
> XC2 Software LLC – XC2LIVE!
> mailto:  [hidden email]
> PH:  800.761.4999 – 415.456.9200
>
>
> -----Original Message-----
> From: 4D_Tech [mailto:[hidden email]] On Behalf Of Christian Sakowski
> Sent: Thursday, January 26, 2017 6:29 AM
> To: 4D iNug Technical <[hidden email]>
> Subject: Re: Missing Pict
>
>> SET PICTURE TO LIBRARY($vpPict;$vPictRef;$vPictName)
>
> FYI: Never use the library anymore. It's obsolete since v11. You have to use the Resources-Folder.
>
>
> **********************************************************************
> 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]
> **********************************************************************

**********************************************************************
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
|  
Report Content as Inappropriate

Re: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
I put all of my pictures into PNG in external files some years back. I
 wrote a tech note about migrating from the picture library and it had some
tips and code...although I can't remember what it said. It might be worth
checking out. Chances are, there are better ideas out there - so if
something in there seems off, ask here and that helps the archives.

[Later] Okay, clearly I'm losing it - I wrote this note last year and it's
21 pages with a bunch of utility code. Who knew? It looks like it's
generally available for download from here:

http://kb.4d.com/assetid=77446

Presumably, there's something useful in there.I saw JPRs tool at the road
show and it *definitely* looked helpful. Not sure why there isn't a
conversion tool of some kind that's fully automated, but I guess JPR's tool
is meant to improve the situation some. Not sure where you get it
officially...or if you can.
**********************************************************************
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
|  
Report Content as Inappropriate

Re: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
This was a big help with the Picture Library.  Run it from a version of 4D that still supports the old format.  http://kb.4d.com/assetid=76775 <http://kb.4d.com/assetid=76775>

Keith - CDI

> On Aug 9, 2017, at 2:28 PM, David Adams via 4D_Tech <[hidden email]> wrote:
>
> I put all of my pictures into PNG in external files some years back. I
> wrote a tech note about migrating from the picture library and it had some
> tips and code...although I can't remember what it said. It might be worth
> checking out. Chances are, there are better ideas out there - so if
> something in there seems off, ask here and that helps the archives.
>
> [Later] Okay, clearly I'm losing it - I wrote this note last year and it's
> 21 pages with a bunch of utility code. Who knew? It looks like it's
> generally available for download from here:
>
> http://kb.4d.com/assetid=77446
>
> Presumably, there's something useful in there.I saw JPRs tool at the road
> show and it *definitely* looked helpful. Not sure why there isn't a
> conversion tool of some kind that's fully automated, but I guess JPR's tool
> is meant to improve the situation some. Not sure where you get it
> officially...or if you can.


**********************************************************************
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
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
Frijoles Frio!

Thanks

Randy Engle, Director
XC2 Software LLC – XC2LIVE!
mailto:  [hidden email]
PH:  800.761.4999 – 415.456.9200


-----Original Message-----
From: 4D_Tech [mailto:[hidden email]] On Behalf Of Keith Culotta via 4D_Tech
Sent: Wednesday, August 9, 2017 12:35 PM
To: 4D iNug Technical <[hidden email]>
Cc: Keith Culotta <[hidden email]>
Subject: Re: Missing Pict - 64bit Removes pictures from library

This was a big help with the Picture Library.  Run it from a version of 4D that still supports the old format.  http://kb.4d.com/assetid=76775 <http://kb.4d.com/assetid=76775>

Keith - CDI



**********************************************************************
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
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
On Aug 9, 2017, at 2:59 PM, Randy Engle wrote:

> Been messing with 64bit v16r4
>
> Found that most (not all) of my PICTURE LIBRARY pictures went south.
>
> If I open the app in the 32 bit version, they are all still there.
>
> So... what Christian said below, is more than a "good idea"
>
> Not looking forward to redoing all of these pictures into the resources folder and then finding all references to them.

It is not required to move all your picture to the Resources folder. You can continue to use the Picture Library. All that is needed is to convert the old picture format into a new format. Leave the picture names and IDs in the library the same and you will not need to update any code or forms.

Here is the code from the knowledge base article. http://kb.4d.com/assetid=76775

If (True)
    If (False)
    Begin SQL
    /*
    Name: UTIL_ConvertPICTs
    Path: UTIL_ConvertPICTs

    Purpose: Convert all PICT formatted images in the
    Picture Libraray to .PNG images

    The v13.2 or later 4D Pack Plugin must be installed to use this method

    */
    End SQL
    End if
    C_TEXT($MethodName_T)
    $MethodName_T:=Current method name
    //===================== Declare Variables ==================================
    //method_parameters_declarations
    //--------------------------------------------------------------------------------
    //method_wide_constants_declarations
    //--------------------------------------------------------------------------------
    //local_variable_declarations
    C_LONGINT($Ndx;$SOA;$RIS;$PictRef_L)
    C_TEXT($PictName_T)
    C_PICTURE($Pict_G)
    C_POINTER($Pict_P)
End if
//====================== Initialize and Setup ================================

ARRAY LONGINT($PictRef_aL;0)
ARRAY TEXT($PictName_aT;0)

PICTURE LIBRARY LIST($PictRef_aL;$PictName_aT)
$SOA:=Size of array($PictRef_aL)

//======================== Method Actions ==================================

If ($SOA>0)
    For ($Ndx;1;$SOA)  // for each picture
      $PictRef_L:=$PictRef_aL{$Ndx}
      $PictName_T:=$PictName_aT{$Ndx}
      GET PICTURE FROM LIBRARY($PictRef_aL{$Ndx};$Pict_G)
      $Pict_P:=->$Pict_G  // passage of a pointer
      If (AP Is Picture Deprecated ($Pict_P)=1)  // if format is obsolete
        CONVERT PICTURE($Pict_G;".PNG")  // conversion to png
        SET PICTURE TO LIBRARY($Pict_G;$PictRef_L;$PictName_T)  // and storage in the library
      End if
    End for
Else
    ALERT("The picture library is empty.")
End if

//======================== Clean up and Exit =================================

Tim

********************************************
Tim Nevels
Innovative Solutions
785-749-3444
[hidden email]
********************************************

**********************************************************************
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
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Don't forget that the MSC helps you locate deprecated pictures:
http://blog.4d.com/msc-now-helps-you-to-find-deprecated-images/

These deprecated images will not be visible in 64 bit, they must be converted (for example, while in 32 bit).

-Tim




**********************************************************************
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
|  
Report Content as Inappropriate

Re: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
You are missing one line of code

TRANSFORM PICTURE($Pict_G;Transparency;0x00FFFFFF)

This will set white background to clear.

regards

Chuck

------------------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306
 Informed Solutions, Inc. Fax: (617) 232-1064      
 mailto:cjmiller<AT SIGN>informed-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 Aug 9, 2017, at 4:22 PM, Tim Nevels via 4D_Tech <[hidden email]> wrote:
>
>   For ($Ndx;1;$SOA)  // for each picture
>     $PictRef_L:=$PictRef_aL{$Ndx}
>     $PictName_T:=$PictName_aT{$Ndx}
>     GET PICTURE FROM LIBRARY($PictRef_aL{$Ndx};$Pict_G)
>     $Pict_P:=->$Pict_G  // passage of a pointer
>     If (AP Is Picture Deprecated ($Pict_P)=1)  // if format is obsolete
>       CONVERT PICTURE($Pict_G;".PNG")  // conversion to png
>       SET PICTURE TO LIBRARY($Pict_G;$PictRef_L;$PictName_T)  // and storage in the library
>     End if
>   End for

**********************************************************************
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
|  
Report Content as Inappropriate

RE: Missing Pict - 64bit Removes pictures from library

4D Tech mailing list
In reply to this post by 4D Tech mailing list
I really appreciate how so many of you chimed in so quickly on this topic!

Many, many thanks to all!

Randy Engle


**********************************************************************
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]
**********************************************************************
Loading...