Re: Moving picture resources from one database to another

2018-11-04 Thread Keisuke Miyako via 4D_Tech
is it not the architecture, not version, that determines whether the conversion 
would work? a 32-bit version of v17 is available for compatibility, if you go 
directly to the download site (i.e. not the web site)

2018/11/04 14:24、Robert ListMail via 4D_Tech <4d_tech@lists.4d.com>のメール:

This works perfectly but it must be done BEFORE you convert the structure to 
v17. I hope this helps someone.



**
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: Moving picture resources from one database to another

2018-11-03 Thread Robert ListMail via 4D_Tech
Tim, nice piece if code that I was hoping to use to convert my PICT library 
images to PNG….  This works perfectly but it must be done BEFORE you convert 
the structure to v17. I hope this helps someone.

Regards,

Robert

> On Feb 10, 2018, at 4:28 PM, Tim Nevels via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> This method converts all pictures in the library to PNG format and then 
> writes them back to the library. It’s an example to see the logic that you 
> would use.
> 
> C_TEXT($pictureName_t)
> C_PICTURE($picture_c)
> C_LONGINT($i;$pictureID_l)
> ARRAY LONGINT($pictureID_al;0)
> ARRAY TEXT($pictureName_at;0)
> 
> PICTURE LIBRARY LIST($pictureID_al;$pictureName_at)
> 
> For ($i;1;Size of array($pictureID_al))
>   $pictureID_l:=$pictureID_al{$i}
>   $pictureName_t:=$pictureName_at{$i}
>   GET PICTURE FROM LIBRARY($pictureID_l;$picture_c)
> 
> // convert the picture
>   CONVERT PICTURE($picture_c;".png")
> 
> // make all white pixels transparent
>   TRANSFORM PICTURE($picture_c;Transparency;0x00FF)
> 
> // write back to library
>   SET PICTURE TO LIBRARY($picture_c;$pictureID_l;$pictureName_t)
> End for 

**
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: Moving picture resources from one database to another

2018-02-10 Thread Patrick Emanuel via 4D_Tech
Hi,

This method works well only if you are not in a 64 bits version. All old
pictures format aren't recognize.
So, if you want that work, use this code in a 32 bits version.



-
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)
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Moving picture resources from one database to another

2018-02-10 Thread Tim Nevels via 4D_Tech
On Feb 10, 2018, at 2:00 PM, Dave Tenen wrote:

> Forgive my ignorance on these features.  Maybe I wasn’t clear…I am in the 
> toolbox, in the Pictures item.  There are pictures in that list (I'm assuming 
> they are buried in the structure)  I want to take all of them and move them 
> into a place that a different structure can use them, ideally so they can be 
> reused by many structures…similar to a component!  

Hi Dave,

4D provides all the commands that you need to accomplish this. I’ve not done 
exactly what you want to do, but I have done something that works with the 
Toolbox Picture Library. 

This method converts all pictures in the library to PNG format and then writes 
them back to the library. It’s an example to see the logic that you would use.

C_TEXT($pictureName_t)
C_PICTURE($picture_c)
C_LONGINT($i;$pictureID_l)
ARRAY LONGINT($pictureID_al;0)
ARRAY TEXT($pictureName_at;0)

PICTURE LIBRARY LIST($pictureID_al;$pictureName_at)

For ($i;1;Size of array($pictureID_al))
$pictureID_l:=$pictureID_al{$i}
$pictureName_t:=$pictureName_at{$i}
GET PICTURE FROM LIBRARY($pictureID_l;$picture_c)

  // convert the picture
CONVERT PICTURE($picture_c;".png")

  // make all white pixels transparent
TRANSFORM PICTURE($picture_c;Transparency;0x00FF)

  // write back to library
SET PICTURE TO LIBRARY($picture_c;$pictureID_l;$pictureName_t)
End for 

So for your need, change the SET PICTURE TO LIBRARY command to something that 
will save $picture_d to file on your hard drive like the WRITE PICTURE FILE 
command.

Here are the docs on “Pictures” commands. It will have all the information you 
need to accomplish your goal.

http://doc.4d.com/4Dv16/4D/16.3/Pictures.201-3651053.en.html

Tim

*
Tim Nevels
Innovative Solutions
785-749-3444
timnev...@mac.com
*

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Moving picture resources from one database to another

2018-02-10 Thread Dave Tenen via 4D_Tech


> Message: 13
> Date: Thu, 8 Feb 2018 10:57:53 -0500
> From: Jeffrey Kain <jeffrey.k...@gmail.com>
> To: 4D iNug Technical <4d_tech@lists.4d.com>
> Subject: Re: Moving picture resources from one database to another
> Message-ID: <c84bd425-a011-43a9-b04e-b8c6b3adc...@gmail.com>
> Content-Type: text/plain; charset=utf-8
> 
> Don't be using Mac resources anymore. 
> 
> Get those pictures into files and put them into the Resources folder next to 
> your structure file (there's even a drag and drop GUI (Design menu->Tool 
> Box->Resources) where you can drag pictures from your desktop into the window 
> and 4D will copy them to Resources automatically, and you can drag them out 
> this window and onto a form where 4D will create a reference to this picture, 
> much like the picture library.


Forgive my ignorance on these features.  Maybe I wasn’t clear…I am in the 
toolbox, in the Pictures item.  There are pictures in that list (I'm assuming 
they are buried in the structure)  I want to take all of them and move them 
into a place that a different structure can use them, ideally so they can be 
reused by many structures…similar to a component!  

Dave Tenen


Personal Chef 

Coming to you from Spec Pond and I swear the fish was
[]
this big

dte...@me.com

**
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:4d_tech-unsubscr...@lists.4d.com
**

Re: Moving picture resources from one database to another

2018-02-08 Thread Jeffrey Kain via 4D_Tech
Don't be using Mac resources anymore. 

Get those pictures into files and put them into the Resources folder next to 
your structure file (there's even a drag and drop GUI (Design menu->Tool 
Box->Resources) where you can drag pictures from your desktop into the window 
and 4D will copy them to Resources automatically, and you can drag them out 
this window and onto a form where 4D will create a reference to this picture, 
much like the picture library.

--
Jeffrey Kain
jeffrey.k...@gmail.com




> On Feb 8, 2018, at 10:49 AM, Dave Tenen via 4D_Tech <4d_tech@lists.4d.com> 
> wrote:
> 
> I am trying to move some picture resources between two structure file (on a 
> Mac) and it seems that you can’t move multiple resources at a time.  Is this 
> true?

**
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:4d_tech-unsubscr...@lists.4d.com
**

Moving picture resources from one database to another

2018-02-08 Thread Dave Tenen via 4D_Tech
Hello out there.

I am getting back into the 4D world after a few years of absence, so forgive my 
questions!

I am trying to move some picture resources between two structure file (on a 
Mac) and it seems that you can’t move multiple resources at a time.  Is this 
true?

Are there any tools out there to make this whole process over merging 
structures a little more organized or trackable?

Thanks in advance,
Dave Tenen


Personal Chef 

Coming to you from Spec Pond and I swear the fish was
[]
this big

dte...@me.com 
**
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:4d_tech-unsubscr...@lists.4d.com
**