Skip to content

Commit

Permalink
Clarify image w-h mismatch
Browse files Browse the repository at this point in the history
  • Loading branch information
mbasaglia authored Aug 28, 2024
1 parent 823f06c commit 027b4c0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/specs/assets.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@
Image formats supported vary depending on the player. Some commonly supported formats are JPEG, GIF, PNG and SVG.

{schema_object:assets/image}

If the dimensions of the image asset does not match the size given by `w` and `h`,
renderers MUST ensure image layers referencing that asset do not have any visuals
exceeding the `w`-`h` size. It's RECOMMENDED they scale the image maintaining
its aspect ratio and they center it within the $(0, 0)$, $(w, h)$ box.

Even if an image asset does not have any intrinsic size, its contents MUST
still stay within the `w`-`h` bounds when rendered.

Authoring tools SHOULD export files where `w` and `h` match the physical size of the assets.

0 comments on commit 027b4c0

Please sign in to comment.