Author Topic: Aspect variable inconsistent  (Read 2333 times)

Offline ajmast

  • Member
  • **
  • Posts: 51
    • View Profile
Aspect variable inconsistent
« on: April 01, 2021, 06:49:34 AM »
{aspect} produces 1.78 for a ratio on a 16x9 crop
{aspectcrop} produces 1.777738 for a ratio on a 16x9 crop

Feels like those two should be consistent in the decimal places they report.


( I am using them as part of a code replacement formula, thus why I noticed)

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Aspect variable inconsistent
« Reply #1 on: April 01, 2021, 09:16:22 AM »
{aspect} produces 1.78 for a ratio on a 16x9 crop
{aspectcrop} produces 1.777738 for a ratio on a 16x9 crop

Feels like those two should be consistent in the decimal places they report.


( I am using them as part of a code replacement formula, thus why I noticed)

The variable {aspect} does not consider the crop at all, just the dimensions of the image.
The variable {aspectcrop} considers the crop and it's quite possible given the size of the crop vs. the size of the image that the ratio won't be a perfect match even if the crop was constrained to the ratio of the image.

-Kirk