Comments (2)
Yes, I think this is a bug -- it looks like affine is not calculating the error residual correctly at the start of generate. I'll have a look, and thanks for reporting!
from libvips.
I did some more digging and affine is fine, it's just a rounding problem.
When affine generates the large image, pixel (0, 5) is computed like this:
vips_interpolate_nearest_interpolate: (1, 1) (0, 1): 0
Where the first coordinate is the sample position as a pair of doubles, and the second is after nearest rounding (ie. floor()
). Obviously the second pair must be (1, 1) as well, so this looks bizarre.
If you pause there in a debugger, you see:
344 const VipsPel *restrict p = VIPS_REGION_ADDR(in, xi, yi);
(gdb) p x
$20 = 0.99999999999999989
(gdb) p y
$21 = 1.0000000000000004
(gdb)
x is just under 1.0, so it becomes 0.
I don't think there's anything we can do about this, nearest interpolation will always be noisy.
from libvips.
Related Issues (20)
- Conversion to PFM gives incorrect output HOT 2
- Improve `tilecache` performance
- JXL Support in Libvips Web Build HOT 3
- vips: unknown action "dzsave", vips-8.15.1 on Gentoo HOT 1
- Looks like 8.15.2 tag is wrong? HOT 1
- vips 8.15.2 failed to build with latest xcode HOT 11
- HDR AVIF to HEIC (hdr) HOT 4
- Feature request: Support SDR→HDR via RTX HDR (upmapping / inverse tone mapping)
- AVIF with bitdepth 10 or 12 crashes
- Add nclx->icc colour management to heifload HOT 24
- Segmentation fault when performing very large number of operations HOT 1
- Subsample mode not working with jpegli HOT 4
- Add target write to `rawsave` HOT 2
- Cannot link to proper libraries on Windows 11 Pro. HOT 1
- Thumbnail/Resize removes color on Alpine HOT 1
- Add support for fractional tiff values (eg. 10 or 12 bits per pixel) HOT 6
- Include JXL as Foreign TIFF Compression HOT 3
- The position of "#include <vips/vips8>" matters. HOT 2
- distance transform HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libvips.