Save Screeshot/Snapshot to Jpg file

Home Forums Puzzles Save Screeshot/Snapshot to Jpg file

This topic contains 39 replies, has 2 voices, and was last updated by Yuri Kovelenov Yuri Kovelenov 2 months, 1 week ago.

Viewing 15 posts - 1 through 15 (of 40 total)
  • Author
    Posts
  • #18599
    Manuel
    Manuel
    Licensee

    Hi

    I want to add a button to save the current view of a object to a jpg file

    Is it possible?

    Thanks

    #18604
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Hi,

    You can use the take screenshot puzzle for that (also need to enable screenshots with configure app puzzle). It only generates the image though. To be able to download it, you can use the following JavaScript snippet

    and call it from Puzzles as described here.

    Attached an example project.

    Attachments:
    You must be logged in to view attached files.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18609
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Update:

    make it

    to work on Firefox.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18614
    Manuel
    Manuel
    Licensee

    Thanks a lot

    The only problem now, is that i get a black image :-S

    Any idea that can be?

    Thanks

    #18615
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    also need to enable screenshots with configure app puzzle)

    :)

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18616
    Manuel
    Manuel
    Licensee

    Fixed!

    Sorry, i hadn’t checked the option in initialization panel ^^

    Thanks :good:

    #18618
    Manuel
    Manuel
    Licensee

    Now i see that, another question…

    Is there any possibility to change the background automatically or make it transparent when you save the pic?

    Thks again ^^

    #18620
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Try the transparent background option in the same puzzle: https://www.soft8soft.com/docs/manual/en/puzzles/Initialization.html#configure_application

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18623
    Manuel
    Manuel
    Licensee

    Try the transparent background option in the same puzzle: https://www.soft8soft.com/docs/manual/en/puzzles/Initialization.html#configure_application

    As i have a sphere background, i solve it like this (look attached file)

    Is there any cleaner form to do it?

    Because here, i depend of cpu speed, i suppose isn’t it?

    Attachments:
    You must be logged in to view attached files.
    #18625
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    Yep, you can use 0 second time to make it lapse only 1 rendering frame.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18628
    Manuel
    Manuel
    Licensee

    Yep, you can use 0 second time to make it lapse only 1 rendering frame.

    I tested it, but i doesn’t work :-S

    #18634
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    What does it produce? non-transparent background?

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18636
    Manuel
    Manuel
    Licensee

    What does it produce? non-transparent background?

    Correct!

    It seems that with “0” value, there’s no time to grab the transparent backgroud.

    #18637
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    you can try another approach – using the every frame puzzle with a counter to wait for 1 or 2 rendering frames.

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #18698
    Manuel
    Manuel
    Licensee

    you can try another approach – using the every frame puzzle with a counter to wait for 1 or 2 rendering frames.

    I don’t know how to use it, as i can’t puzzle it into my “click” function :-S

Viewing 15 posts - 1 through 15 (of 40 total)

You must be logged in to reply to this topic.