|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #79052 Incorrect BZERO in FITS header
Submitted: 2020-01-01 03:29 UTC Modified: -
From: gajowy at agzeta dot pl Assigned:
Status: Open Package: imagick (PECL)
PHP Version: 7.3.13 OS: Windows
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: gajowy at agzeta dot pl
New email:
PHP Version: OS:


 [2020-01-01 03:29 UTC] gajowy at agzeta dot pl
When creating 16-bit FITS file, a value of BZERO header is set literaly to "3.276750E+04", what is 32767.5
In this case it is impossible to store correct pixel value in 16-bits, as it's calculated as follows:
true_pixel_value = array_value * BSCALE + BZERO

Test script:
$im= new Imagick();

Expected result:
Value 32768 is used instead for BZERO.

Actual result:
BZERO is 3.276750E+04


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Apr 21 21:01:24 2021 UTC