I added a image with resolution for example 600x400, and set the size(600,400). Its perfectly works
However,
When i change size to another value for example size(800x600), the image cant be shown.
How do i solve that problem?
Actually, i want to add 2 photo with different resolutions and place them in a different location.
for example first image placed x=0 y=0 [top left corner of image] and second one x=250 y=250 [again top left corner of image].
When i code like this, the image appears. (My frog.jpg’s resolution is width1024, heigth551)
However if i change the size(1024,551) to another value, it doesnt appear…(with same image.)
Like
-b- and i think you are aware ( and that should be your first test )
of the default way to show the file / picture
void draw() {
image(frog,0,0);
}
-c- your way
“loading the image”
AGAIN and AGAIN ( 60 times per sec )
by overwriting the pixels buffer with pixels from picture
( might be for some further experiments )
but be aware that using width and height in the double for loop
is insofar “wrong” ( if not wanted )
as the “lines of picture” logic usually requires to use
frog.width
frog.height
actually i expect that there is a error in case your width*height is bigger as the
frog.width*frog.height = frog.length
( total number of pix in picture )
so please
-a- test the normal image(frog,0,0) way to make sure picture file loads ok.
-b- take the pixels thing out of draw
-c- repair the loop logic
could you please give some more words about
what you want to do?