[Oberon] Rembrandt > Scale :html (gif) ?
eas-lab at absamail.co.za
eas-lab at absamail.co.za
Sun Sep 7 06:09:18 CEST 2003
--- Peter Easthope <peter_easthope at gulfnet.sd64.bc.ca>
> > cg> Q1. does this only apply to *.Pict ?
> > Probably. Can Rembrandt open any file other than
> > Pict?
> John Drake wrote:
> Yes. In fact Rembrandt used to be the only tool
> for opening gif and other files. But now by
> default ImageDocs is associated with gif files
> instead of RembrandtDocs. In Windows System 3
> this is changed using IniEdit.Panel. I'm not
> sure how it's done under N-O.
> > cg> Q3. Since converting: *.gif <--> *.Pict is
> > possible under n-o
> > PictConverters has *.gif --> *.Pict. Where is
> > *.Pict --> *.gif ?
> It's right there in the PictConverters.Tool at the
> bottom. The example given is:
> PictConverters.PictToGIF Clown.Pict => Clown.gif ~
> I use this facility to create graphics from
> Leonardo for web projects. I'll sometimes
> create graphics using Leonardo/Vinci and then
> export them using PictConverters to GIF or
> other formats.
> > > cg> Q3. Since converting: *.gif <--> *.Pict is
> > > possible under n-o, can
> > > I rescale *.gif ?
> > Converting to Pict seems too inefficient for Web
> > browsing.
> I don't think that would be a problem since since
> is very fast on modern computers. But module
> Pictures can directly load Gif files anyway. In
> fact that's what I believe the HTML browser is
> already doing (converting to Pict on the fly).
> Look at the documentation from module Pictures:
> (* Open the picture file with name from disk. Any
> graphic file format listed in the PictureConverters
> section of the Registry can be loaded (e.g. GIF, JPEG,
> XBM, BMP). *)
> PROCEDURE Open (P: Picture; name: ARRAY OF CHAR;
> color: BOOLEAN);
> > How about writing fast scaling commands as part of
> > the Images package?
> GfxImages does precisely that. And Images is better
> than Pictures/Rembrandt anyway since it supports
> more than just 256 colors.
System.Directory GfxImages* = GfxImages.Obj only
?? Where is the documentation ? == GfxHowto.html , GfxOverview.html
Watson.ShowDef GfxImages.Obj ==
PROCEDURE HScale (
PROCEDURE LinearHScale (
PROCEDURE LinearVScale (
PROCEDURE Scale (
PROCEDURE VScale (
!! This should be able to do it ??
file:GfxHowto.html > How do I scale the current coordinate system?
By calling one of
Gfx.Scale(ctxt, sx, sy);
Gfx.ScaleAt(ctxt, sx, sy, x, y);
I'd still like to use existing Oberon pictures. How?
If you have an Oberon picture stored in a file, you can directly load it into an
image using the following code:
VAR img: Images.Image; done: BOOLEAN;
NEW(img); Images.Load(img, "MyImage.Pict", done);
IF done THEN ... END;
__________________________________ Let's see what Rembrandt.Panel can do ?
System.Directory *.gif == > SaveLife.gif
System.CopyFiles SaveLife.gif => Temp.gif ~
Desktops.OpenDoc Temp.gif ~ <--- a small one: width < UserTrack
PictConverters.GIFToPict Temp.gif => Temp.Pict ~
Desktops.OpenDoc Temp.Pict ~ == same except black text now = green
> [Scale icon] ; position ^ RM inside Pict ;
Position at top-left corner; MM & move inwards while noting the scale scroll.
Release at suitable scale to see scaled picture in newly created viewer.
== OK = can scale *.Pict == Now try: *.gif == NO=fails.
Try: System.CopyFiles Techn:DataSlicr.gif => Big.gif ~
Desktops.OpenDoc Big.gif ~ === width > UserTrack
PictConverters.GIFToPict Big.gif => Big.Pict ~
Desktops.OpenDoc Big.Pict ~ == lines to light-green and some missing ?
> [Scale icon] > select=MR > MM to scale = picture more managable
but 'parts' missing. > Store as Reduced.Pict
Desktops.OpenDoc Reduced.Pict ~ == looks the same
PictConverters.PictToGIF Reduced.Pict => Reduced.gif ~
Desktops.OpenDoc Reduced.gif ~ == grenn-lines back to black but some
lines are lost.
OK, in principle *.gif can be converted to *.Pict for scaling and then
converted back (if need be).
Test with: SYS:PICscope.html
More information about the Oberon