🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Capture images in Hypermesh with Image size

Hi,

 

Hypermesh has an API '*jpegfilenamed' to capture images. But, with this I am not able to control the size of the images.  Is there any way to achieve this?

 

In Hyperview, we have an  API  ' CaptureScreenToSize' that enables us to capture images with different sizes. I am looking for a similar option in Hypermesh.

 

Thanks

Find more posts tagged with

Sort by:
1 - 8 of 81
    tinhUser: "tinh"
    Altair Community Member
    Updated by tinh

    Hi,

    B)/emoticons/default_cool.png' title='B)' />write your own function, like this:

     proc ::p_CaptureGraphic {Size {FilePath {}} {Center {}}} {     lassign [hm_getgraphicsarea] x y w h     lassign $Size W H     lassign $Center Cx Cy     if {[string equal '' $H]} {set H $W}     if {[string equal '' $Cx]} {set Cx 0; set Cy 0}     if {[string equal '' $Cy]} {set Cy $Cx}     set X [expr $x+$w/2+$Cx-$W/2]     set Y [expr $y+$h/2+$Cy-$H/2]     if {[string equal '' $FilePath]} {         hm_windowtoclipboard $X $Y $W $H     } else {         hm_windowtofile $X $Y $W $H $FilePath     } }  #example, copy a square 100x100 at center of graphic: p_CaptureGraphic 100 file1.jpg #copy 200x300  p_CaptureGraphic {200 300} file2.jpg #copy 50x50 near by right bottom corner (offset x100 y100 from center of graphic): p_CaptureGraphic 50 file3.jpg {100 100}

     

    Thanks tinh.

     

    This is a useful code where I can control the area of the screen that I want to capture.

     

    Actually, I want to capture the entire HM graphics screen and then control the size of the resulting image. So, anyway I can do that?

    tinhUser: "tinh"
    Altair Community Member
    Updated by tinh

    Do you mean you want to zoom in/out ?

    No, I dont want to zoom.

     

    Say, if my '*jpegfilenamed' API captures image with size 1162*722.  I want the same image to be resized to 722*722, so that I can easily populate them in my Powerpoint presentations.

    tinhUser: "tinh"
    Altair Community Member
    Updated by tinh

    I understand,

    You want to crop the image, dont you?

    Because otherwise it is stretched/collapsed similar to zooming

    Well, I don't want to crop the image. Instead, I  want the entire image to be resized.

     

    Something like this...

     

    <?xml version="1.0" encoding="UTF-8"?>Capture.JPG

    tinhUser: "tinh"
    Altair Community Member
    Updated by tinh

    Ok. Please refer to

    Http://wiki.tcl.tk/11196

    Thanks tinh,

     

    This should help.. :)/emoticons/default_smile.png' srcset='/emoticons/smile@2x.png 2x' title=':)' width='20' />