Jump to content

Change bitmap size


Jiajing

Recommended Posts

Hi @Jiajing,

   I got an email from the Forum from your earlier post which you since modified, so you may already have the answer, but in case not, here is a more explicit use of the call.

 

Xdesired = 123                # your desired image width
Himg = vs.FSActLayer()        # handle to image object
(x1, y1), (x2, y2) = vs.GetBBox(Himg)
xcen, ycen = vs.HCenter(Himg)
scaleF = Xdesired / (x2-x1)   # for uniform scaling
vs.HScale2D(Himg, xcen, ycen, scaleF, scaleF, False)

 

HTH,

Raymond

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...