Displaying an image in a display surface

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

Displaying an image in a display surface

Jay
All,
For my application, I am capturing  bmp images by following statement.
(ImageReader fromFile:'C:\Lighthouse.bmp') image.
But the problem is that my display surface size is 200@200.
However, the image is of 1024@768.
Becz of that, in the available display surface its showing only the picture portion of 200@200.
 
My intension is to scale the image as proportional to the display surface size. I have seen the method shrunkenBy: . But that is still giving me only a portion of the actual image.

Any advise on this would be highly appreciated.
Note: I am trying this in VW 5.i
Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Displaying an image in a display surface

Mark Pirogovsky-3
Jay,

Using the

shrunkenBy: method would degrade the image quality. There is another one: #magnifiedBy: scale.  If you want reasonable quality you'd need to use third party libs for the image manipulations.

Personally I would  wrap the image in the scrolling wrapper and then display it in the small window with the scroll bars - this way your image is intact ( no losses) and you can see any part of it...

My 2c.

--Mark

Jay wrote:

> All,
> For my application, I am capturing  bmp images by following statement.
> (ImageReader fromFile:'C:\Lighthouse.bmp') image.
> But the problem is that my display surface size is 200@200.
> However, the image is of 1024@768.
> Becz of that, in the available display surface its showing only the picture
> portion of 200@200.
>  
> My intension is to scale the image as proportional to the display surface
> size. I have seen the method shrunkenBy: . But that is still giving me only
> a portion of the actual image.
>
> Any advise on this would be highly appreciated.
> Note: I am trying this in VW 5.i
> Thanks
>
>
>
> --
> View this message in context: http://forum.world.st/Displaying-an-image-in-a-display-surface-tp4643641.html
> Sent from the VisualWorks mailing list archive at Nabble.com.
> _______________________________________________
> vwnc mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
>
>

____________________________________________________________
Dealing With Incontinence
Learn About This Medical Condition. What You May Be Able To Do About It
http://thirdpartyoffers.netzero.net/TGL3241/5023e29ea9316629e226fst04duc
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc