OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: khann on November 28, 2013, 11:01:26 PM

Title: Large Image in picture cannot be automatically shrink to Pic Control size?
Post by: khann on November 28, 2013, 11:01:26 PM
Hi,  ::)
If there is a picture image of larger than the Pic Control size,
It cannot be shrink to fit the Pic Control?

Ex : a pic, (PicID num 100 in the picture list) has a size of H 200, W 300, and the Pic Control has a size of H 150, W 200.
I want the pic num 100 automatically fit to the size of Pic Control.

(dcl_PictureBox_LoadPictureFile  formMH_PictureBox1 Filename [as String] {Stretch [as Boolean]})
dcl_PictureBox_LoadPictureFile  has a "Stretch" option.
So the pictures in picture list?

Or am I missing any properties in Pic Control?

Thanks.
Title: Re: Large Image in picture cannot be automatically shrink to Pic Control size?
Post by: owenwengerd on November 29, 2013, 04:16:15 AM
I think you are correct that there is no way to rescale except by loading from a file.
Title: Re: Large Image in picture cannot be automatically shrink to Pic Control size?
Post by: Fred Tomke on November 29, 2013, 04:57:50 AM
Quote from: khann on November 28, 2013, 11:01:26 PM
Hi,  ::)
If there is a picture image of larger than the Pic Control size,
It cannot be shrink to fit the Pic Control?

Yes, you can. I do it that way:

All you need is to build a .NET backgroundworker or a resampler at all.
In the screenshot you see a picture of 6250x6250 pixels. It makes no sense to load it into picbox. That's why it is resampled to the current size of ppic box.

Regards, Fred
Title: Re: Large Image in picture cannot be automatically shrink to Pic Control size?
Post by: khann on November 29, 2013, 07:44:22 PM
Thanks you , Owen and Fred, for the replies.
I just want to know some way to make it in Open DCL.
If I should and need, will ask you, Fred for more tips.

Thanks.  :D