Loading in images

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading in images

awood969
Hi guys,

How does one import images into SmallTalk? I have a .jpeg file that I created using the paint widget in the widgets shared tab.

However I want this to load into my program at another point, is it a case of using a SketchMorph?? If somebody could just point me in the right direction?

Thanks
Andrew
Reply | Threaded
Open this post in threaded view
|

Re: Loading in images

Ken G. Brown
Here's something to try:
Do a cmd-click on the paint object to bring up the halos.
>From the menu halo at upper left, you should be able to export the image to a file.
To load it back in, one way is to just drag and drop onto your open Squeak image.

You can use the same halo menu to set it as your background too, among other things.

Hope this helps.
Ken


At 1:16 PM -0800 12/8/10, awood969 apparently wrote:

>Hi guys,
>
>How does one import images into SmallTalk? I have a .jpeg file that I
>created using the paint widget in the widgets shared tab.
>
>However I want this to load into my program at another point, is it a case
>of using a SketchMorph?? If somebody could just point me in the right
>direction?
>
>Thanks
>Andrew
>--
>View this message in context: http://forum.world.st/Loading-in-images-tp3079106p3079106.html
>Sent from the Squeak - Beginners mailing list archive at Nabble.com.
>_______________________________________________
>Beginners mailing list
>[hidden email]
>http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Loading in images

awood969
Thanks Ken,

Yes I just figured that bit out I was meaning more in code to load the image up as a Morph of some description?

Thanks
Andrew
Reply | Threaded
Open this post in threaded view
|

Re: Loading in images

Levente Uzonyi-2
On Wed, 8 Dec 2010, awood969 wrote:

>
> Thanks Ken,
>
> Yes I just figured that bit out I was meaning more in code to load the image
> up as a Morph of some description?

Try

SketchMorph fromFile: '<yourImageFileNameHere>'

or

(ImageReadWriter formFromFileNamed: '<yourImageFileNameHere>') asMorph


Levente

>
> Thanks
> Andrew
> --
> View this message in context: http://forum.world.st/Loading-in-images-tp3079106p3079144.html
> Sent from the Squeak - Beginners mailing list archive at Nabble.com.
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Loading in images

awood969
Thank You very much that did the trick!