where is the ImageImports repository?

Edgar J. De Cleene edgardec2001 at yahoo.com.ar
Fri Oct 6 23:16:57 UTC 2006


Bakki Kudva puso en su mail :

> 
> I did the import and can't see where it is. Did a search for
> ImageImports class but nada.
> 
> I would appreciate any help on how to import image files from the hard
> drive and then define a class which would serve it. Thank you,
> 
> bakki
Bakki
In Form >>importImage: fullName
    "Import the given image file and store the resulting Form in the default
Imports.
    The image is named with the short filename up to the first period,
possibly with additions from the directory path to make it unique."

    Imports default importImageFromFileNamed: fullName.

So you could see ImageImports  is not a class.

And I share a very nice trick for having compressed picts in a image
I have 
Dictionary subclass: #MisDibujos

and 
MisDibujos class
    instanceVariableNames: 'current'
with usual setter and getter for current

And as example:
MisDibujos current: MisDibujos new.
MisDibujos current inspect
    
MisDibujos current at: 'Felinos3' put: (    RWBinaryOrTextStream with:
(StandardFileStream readOnlyFileNamed: 'Felinos3.jpg')contents) .
    
    f := Form
                        fromBinaryStream:  (MisDibujos current at: i )
reset.

Anf if you wish a Morph:
 f asMorph openInWorld

If you have several .jpg into the .image , you could see the size difference
on this and saving as usual (as pict into Squeak have .form format, bigger
as .jpg)

Hope this help

Edgar



	
	
		
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas




More information about the Squeak-dev mailing list