Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] What is the correct way to use GetImage()?

Author
Message
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 3rd Jul 2021 13:03 Edited at: 3rd Aug 2022 20:29


a full screen is required for my idea.
As indicated in the program.
But here's the problem: it doesn't save the picture.
The point is that the command GetImage(1,0,0,15,15) doesn't work.
programming is a hobby, not a job.
P.S. in google and youtube - nikename pavelman- it is not me!

The author of this post has marked a post as an answer.

Go to answer

n00bstar
20
Years of Service
User Offline
Joined: 9th Feb 2004
Location: Montreal, Canada.
Posted: 3rd Jul 2021 19:22
Works fine. Your image is saved in \AppData\Local\AGKApps\[yourappname]
-----------------------------------------------------------------------------
We all got a chicken duck woman thing waiting for us
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 4th Jul 2021 04:02
dont work.
file emty!!!

1) you check the command in the code that I indicated and you will see that the command does not work!

2)I made a mistake when I created the topic. The topic is relevant for app game kit classic

programming is a hobby, not a job.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Jul 2021 04:35 Edited at: 4th Jul 2021 04:38
thread moved (again - check your PMs).

meanwhile, similar code from ~a year ago worked for you. have you tried that to confirm?

i know Get/SaveImage() works so what might you be doing different now than you did before? (i'm still not willing to wait for generation of 100's of thousands of boxes to test your code ).
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 4th Jul 2021 06:10 Edited at: 4th Jul 2021 08:36
The command works if you run the screen scan in normal mode. If you run it in full screen and so that there are no stripes on wide monitors, then it does not work and makes a transparent capture of the picture. How to be? For example, it @#£# me off when I make a full screen and on a wide monitor there are black stripes on the sides. It's not beautiful.

Thank you so much for moving my message.
The program is short and takes a short period of time.
If you are let down by a huge number of drawing boxes, then you can draw only one. This does not change the essence.
The reason for choosing the screen size.

I saw your link and did not change the last post. vsmysle did not change the pictures to empty.
I was going to make a texture generator for the planet from sprites, but nothing comes of it. I do not understand why the picture is not taken from the screen.
programming is a hobby, not a job.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Jul 2021 08:00 Edited at: 4th Jul 2021 08:27
this code:

produces this image:

Quote: "when I make a full screen and on a wide monitor "
how wide? do you have multiple monitors?

and, why all the Update(), Render(), Update() in your code?
i usually only do Render() once after all Draw()s.

then:

why? when you offer code like this and ask for help with it, it's not very inviting.
i think its best to provide short, clean code when trying to demonstrate something while asking for help.

good luck with this, otherwise.
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 4th Jul 2021 09:08 Edited at: 4th Jul 2021 09:11

emty image
programming is a hobby, not a job.

Attachments

Login to view attachments
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 4th Jul 2021 16:08
After you create the sprite and before you get the image, should you render??
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 4th Jul 2021 16:10
This post has been marked by the post author as the answer.
you never Render()
add it just before GetImage(t, 0, 0, 640, 480 ):
[My Itch.io Home] [Community Apps on Itch.io]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 5th Jul 2021 00:24 Edited at: 5th Jul 2021 00:34
well you are right.
programming is a hobby, not a job.

Login to post a reply

Server time is: 2024-11-23 11:58:24
Your offset time is: 2024-11-23 11:58:24