You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
u is mapped to [0, image_width] instead of [0,image_width-1]. Similarly for v, except that it then subtracts 0.001 for some reason.
The subsequent bounds clipping then corrects, but the last horizontal/vertical pixels are lost at this point. Better to clip the U,V coordinates and then apply a correct real→integer transform.
The pixel base address is recomputed three times — it should be calculated in the constructor instead of three times for every pixel access.
The text was updated successfully, but these errors were encountered:
- Old constructor took image data plus dimensions, new constructor just
takes the image filename and does all loading.
- Added error message when the image file is not found.
- Fixed numerous pixel lookup off-by-a-smidge bugs.
- Increased bullet-proofing of pixel lookup.
- Optimized code to avoid recalculating expressions many times.
- Simplified the calling sites.
- STB image load now specifies exactly three components per pixel (RGB)
- Added explicit member initialization for the default constructor. I'd
love to delete the default constructor altogether, but this triggers
warnings on some build environments.
Resolves#434
u
is mapped to [0, image_width] instead of [0,image_width-1]. Similarly forv
, except that it then subtracts0.001
for some reason.The subsequent bounds clipping then corrects, but the last horizontal/vertical pixels are lost at this point. Better to clip the U,V coordinates and then apply a correct real→integer transform.
The pixel base address is recomputed three times — it should be calculated in the constructor instead of three times for every pixel access.
The text was updated successfully, but these errors were encountered: