a way to import picture for paint

Visuals, audio, animation. Blended, not stirred. If LiveCode is part of your rich media production toolbox, this is the forum for you.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

a way to import picture for paint

Post by jmburnod » Wed Feb 24, 2010 6:00 pm

Hi All,

An interessant discover (for me)

Code: Select all

on ImportPicture pName,pFile
   set the filename of img pName to pFile
   set the imagedata of img pName to the imagedate of img pName
end ImportPicture
It work well with rev 4.0 (i'll try in standalone next time)

But it is really a good idea ?

Jean-Marc
https://alternatic.ch

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: a way to import picture for paint

Post by BvG » Wed Feb 24, 2010 6:05 pm

you can achieve a similar result by using the "import" command. Other then using that, your example is certainly more useful in some cases, like when you do not want a new image created, but change an existing one.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Klaus
Posts: 14192
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: a way to import picture for paint

Post by Klaus » Wed Feb 24, 2010 6:30 pm

Bonjour Jean-Marc,

to make it a bit shorter:

Code: Select all

on ImportPicture pName,pFile
   put url("binfile:" & pFile) into img pName
end ImportPicture
:)

Best

Klaus

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2729
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: a way to import picture for paint

Post by jmburnod » Sat Feb 27, 2010 10:50 am

Yes Bvg

I want change an image early on the card

und

danke noch einmal Klaus for one line less

Regards

Jean-Marc
https://alternatic.ch

Post Reply