Check out Janggi (Korean Chess), our featured variant for December, 2024.


[ Help | Earliest Comments | Latest Comments ]
[ List All Subjects of Discussion | Create New Subject of Discussion ]
[ List Earliest Comments Only For Pages | Games | Rated Pages | Rated Games | Subjects of Discussion ]

Single Comment

Ultima. Game where each type of piece has a different capturing ability. Also called Baroque. (8x8, Cells: 64) (Recognized!)[All Comments] [Add Comment or Rating]
🕸📝Fergus Duniho wrote on Tue, Mar 28, 2023 01:50 PM UTC in reply to H. G. Muller from 08:17 AM:
This would be ideal, but I am not sure whether it is possible. The JavaScript is only aware of the URL of the image; it does not have access to the actual image data.

I looked up the solution and got this:

  var img = document.getElementById('imageId'); 
  var width = img.naturalWidth;
  var height = img.naturalHeight;

Here is a test: