problem with screenshots

Posted By: pjotr987

problem with screenshots - 11/19/12 21:27

hi guys,
may be i do something wrong, but i observed, that if use the following functions to save a screen shot i get saved a squeezed picture in x achsis.

bmap_for_screen (screen_shot_map, 0, 1);
bmap_save(screen_shot_map,"xyz.png");

the saved pic loks compresed in x achsis. circles become ovals.

sory for mistaks

just drank too much wine wink
Posted By: rayp

Re: problem with screenshots - 11/19/12 21:34

wait(1) in between? Dont know or try this
Quote:
file_for_screen (STRING* filename,var number);


Edit: Third edit cause of wlan disconnection.
Posted By: Kartoffel

Re: problem with screenshots - 11/19/12 21:56

yes, as rayp suggested:
file_for_screen (STRING* filename,var number);
is here right.

use -1 as number to write the file name only.
also the screenshot gets taken one frame after the function call
Posted By: pjotr987

Re: problem with screenshots - 11/19/12 22:12

thanks guys for reply
i tested: file_for_screen (STRING* filename,var number);

it solves my squeezing problem partially.
but since i want search objects in the screenshots (track objects for a simulation) i need to access the pixel of the screenshot in realtime. therefor i dont want to save the picture first then load and analyse. i want acess them directly so i use the :
bmap_for_screen (screen_shot_map, 0, 1);
function.

and for acessing the pixel:

int dx=700;
int dy=480;
for(i1 = 0; i1 < dx; i1++)
{
for(j1 = 0; j1 < dy; j1++)
{

pixel_1 = pixel_for_bmap(screen_shot_map,i1,j1);
pixel=pixel_1;
bmp_to_send[i1][j1][0]=pixel;
}
}


but its output seems to be compressed in x-achsis.

any ideas?
thanks in advance for any sugestion
Posted By: Kartoffel

Re: problem with screenshots - 11/19/12 22:20

Originally Posted By: Manual
DirectX is used for saving the image; therefore some restrictions apply. The jpg quality can not be adjusted and the jpg image size must be a multiple of 8. The bmp format can only be read back by bmap_load; it is saved in an unusual 32 bit format and thus can not be used for BMAP definitions or for textures.
© 2024 lite-C Forums