On Sun, Apr 10, 2016 at 10:59:28PM +0200, [email protected] wrote:
> commit 96faf20b1bcef354e6b1fd03a26c286070c52e74
> Author:     FRIGN <[email protected]>
> AuthorDate: Sun Apr 10 22:54:42 2016 +0200
> Commit:     FRIGN <[email protected]>
> CommitDate: Sun Apr 10 22:54:42 2016 +0200
> 
>     Remove dimension checks
>     
>     This may come as a surprise, but I'd like the libraries to handle
>     these cases.
>     Maybe some day libpng supports 0x0 images, so why impose artificial
>     limits here?
>     Same with ppm.
>     
>     For me, an ideal data converter loses as little information as possible.
>     In mixed cases (dimensions 0xn, where n > 0) we could print a warning,
>     but here, 2 principles come at play:
>       - GIGO (garbage in, garbage out)
>       - no information loss if possible
>     Given the code later on won't try to access the malloc(0) region, we
>     are also all safe.

One problem I see with this approach is that an error will potentially go
unnoticed and require more time to diagnose than necessary.

Reply via email to