image/picture control - stretch info 
Author Message
 image/picture control - stretch info

I would like to re-size a picture to fit inside an image control, but at
the same time maintain the correct proportion of the image.  Is this
possible?

Setting the stretch property to true seems adjusts the size of the image
to fit, but does not maintain proportion.

Thanks,

Dave




Wed, 09 Aug 2000 03:00:00 GMT  
 image/picture control - stretch info


writes:

 > Setting the stretch property to true seems adjusts the
 > size of the image to fit, but does not maintain proportion.

Ah, well, perhaps in the next version they'll give us Stretch,
Zoom, and Clip. They do, up at Redmond, already know how
to do so, because they provided all three in the Access  
Image Control.  In the meanwhile, there are third-party, extra-cost
controls which provide the capability and, perhaps, the Wang
Imaging controls, which come with Win NT and W95 OSR2, have
it. I was told that the most-current version of the Wang controls
(now that Kodak has bought Wang) can be found at:
www.eastmansoftware.com/products/ImagingPro/iw95form.htm



Fri, 11 Aug 2000 03:00:00 GMT  
 image/picture control - stretch info

You will have to resize the image control proportionally to the size of the
graphic.  To do this, you will need to know the native size of the graphic
before it is stretched or resized.  Try loading it into a picturebox (just
put a tiny one somewhere out of the way on the form) with the
autoresize=clip graphic to control (or something like that).  Then, in your
code, load the graphic into the picturebox, grab the width and height of the
picture box and save them into variables.  Now, if you know what width you
want for the image in the image control, use the ratio of the graphics
native width/height to calculate the height of the image control.  (i.e.
image.height=(picbox.height*image.width)/picbox.width.

Clear as mud?

Quote:

>I would like to re-size a picture to fit inside an image control, but at
>the same time maintain the correct proportion of the image.  Is this
>possible?

>Setting the stretch property to true seems adjusts the size of the image
>to fit, but does not maintain proportion.

>Thanks,

>Dave




Fri, 11 Aug 2000 03:00:00 GMT  
 image/picture control - stretch info

Hi,
Try the ImagN' Active X.  There is not a better view/scale/print
imaging tool available for VB.  Free trial and info:
http://www.pegasustools.com/imagn/imagn.htm ($399)
Cheers,
jack
--
Come see us at: CeBIT 98 - USA Software Pavilion - Hall 5, Booth A10
********************************************************************
      Jack Berlin - http://www.jpg.com/ - 813-875-7575 x303
          Pegasus Imaging Corp - the BETTER JPEG people!
********************************************************************

Quote:

> I would like to re-size a picture to fit inside an image control, but at
> the same time maintain the correct proportion of the image.  Is this
> possible?

> Setting the stretch property to true seems adjusts the size of the image
> to fit, but does not maintain proportion.

> Thanks,

> Dave




Fri, 11 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. image/picture control - stretch

2. Set Image.Picture Stretch property.

3. Copying a stretched image to picture box

4. Stretch a bitmap to fit in an image or picture box

5. Copying a stretched image to picture box

6. Copy a picture from a Picture Control in a Image Control

7. Stretching an picture as form background picture

8. VB 6 Image control stretching limit problem

9. Large images in Picture or Image Control

10. TIF images in Image or Picture Control

11. Store the image in picture box control into the image data type in SQL server

12. Moving an image stored in a database to an image/picture control

 

 
Powered by phpBB® Forum Software