where is the ImageImports repository?

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

where is the ImageImports repository?

Bakki Kudva
Hi all,

I have been serving up images for Seaside via Apache. I just read
Avi's comment of Thu Sep 9 10 2004 on the thread called [Using image
tags in Seaside] saying...
"Anyway, there are basically two options:

- have the images hosted externally to Seaside, and use image tags with
external URLs:
        html image: 'http://imagehost.com/myimage.jpg' altText: 'My Image'

- suck the image data into your (Squeak) image, and serve it directly
from Seaside:
        html imageWithForm: (MyImages at: #someImage)

I prefer the second, from a deployment point of view, because you end
up with just one .image file to copy around.  It's also great for
dynamically generated images (use PlotMorph to generate live charts,
for example).  But having something like apache serving static images
can be a performance win."

What I am trying to figure out is how to get the images into a class
he calls MyImages. I tried using FileList which has an import button
which has balloon help which says "Load a graphic placing it in the
ImageImports repository.

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

Reply | Threaded
Open this post in threaded view
|

Re: where is the ImageImports repository?

Edgar J. De Cleene
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


Reply | Threaded
Open this post in threaded view
|

Re: where is the ImageImports repository?

Bakki Kudva
Edgar,

Thank you so very much for the explanation. I will use Form to store
all my images.

-bakki

On 10/6/06, Edgar J. De Cleene <[hidden email]> wrote:

> 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
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: where is the ImageImports repository?

Edgar J. De Cleene
Bakki Kudva puso en su mail :

> Edgar,
>
> Thank you so very much for the explanation. I will use Form to store
> all my images.
>
> -bakki
Bakki:

Remember what at use , the best is convert the data stored into the image to
a Morph.
Usually , you end with a ImageMorph or a SketchMorph.

If you like puzzles, could try

ftp://[hidden email]/
password: elpelotero

/Public/SqueakLight/3.9Compatible/Rompecabezas.8.sar

Here you could see how store sound and pict into a specific class
And the technical used for doing a autoinstalable .sar, in this case test if
target is SqueakLight or normal, but same could use for others flavors .

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


Reply | Threaded
Open this post in threaded view
|

Re: where is the ImageImports repository?

Bakki Kudva
I got the sar file and installed it in my 3.9 image. The cat puzzle is
so cute! Timely too, for me, because a few weeks back a stray kitten
showed up under our porch and we have adopted him.

I am reading up on morphs and forms etc and along with your code I
will should be able to serve up images for seaside from within the
image. Thank you again,

bakki

On 10/7/06, Edgar J. De Cleene <[hidden email]> wrote:

> Bakki Kudva puso en su mail :
>
> > Edgar,
> >
> > Thank you so very much for the explanation. I will use Form to store
> > all my images.
> >
> > -bakki
> Bakki:
>
> Remember what at use , the best is convert the data stored into the image to
> a Morph.
> Usually , you end with a ImageMorph or a SketchMorph.
>
> If you like puzzles, could try
>
> ftp://[hidden email]/
> password: elpelotero
>
> /Public/SqueakLight/3.9Compatible/Rompecabezas.8.sar
>
> Here you could see how store sound and pict into a specific class
> And the technical used for doing a autoinstalable .sar, in this case test if
> target is SqueakLight or normal, but same could use for others flavors .
>
> 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
>
>
>