I'm trying to images in Java, and right now I'm using images that are in the local directory and it is working fine. However, it would be nice if I could put the images in a folder and reference the path of the images to draw them, but I've been unable to do that so far.
Right now my code is essentially:
Image theImage = Toolkit.getDe...
I am trying to Draw an Image (JPG, TIFF, PNG) on the background of my user control. My user control will highlight certain portions of the Image using Rectangles. If I draw the image unscaled they are looking correct. But when I draw then Scaled [Fit to Page] then the image is not looking correct. For PNG some times it fails to load the ...
I'm building an application that captures video frames from a camera (30fps @ 640x480), processes them, and then displays them on a Windows Form. I was initially using DrawImage (see code below) but the performance was terrible. Even with the processing step disabled the best I can get is 20fps on a 2.8GHz Core 2 Duo machine. Double buff...
I'm working on a simple JavaScript game using HTML5 canvas. It's a very typical game-loop setup involving:
init() function that initializes objects to be used the playfield, randomizing some start x/y positions and similar setup tasks
draw() function that draws all the game objects, including some simple canvas shapes and a few images
...
Hi.
I've got a problem with canvas context drawImage() method if an image is drawn on a canvas that already has not-integer scale factor. It seems that such images are clipped in a weird way (sometimes the most right part of an image is clipped, sometimes the most bottom side, sometimes both). This problem appears at least in Google Chr...