[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #35229] imread (read_images) fails when Quantu
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #35229] imread (read_images) fails when QuantumDepth is 32 |
Date: |
Tue, 03 Jan 2012 18:53:28 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111107 Ubuntu/10.04 (lucid) Firefox/3.6.24 |
URL:
<http://savannah.gnu.org/bugs/?35229>
Summary: imread (read_images) fails when QuantumDepth is 32
Project: GNU Octave
Submitted by: None
Submitted on: Tue 03 Jan 2012 06:53:27 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Crash
Status: None
Assigned to: None
Originator Name: Bernard Kozioziemski
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.4.3
Operating System: GNU/Linux
_______________________________________________________
Details:
in __magick_read__.cc, I found the following bug. I was getting crashes with
floating point exception (division by zero) when attempting to read a
grayscale image. I traced the problem to line 215 in
src/DLD-FUNCTIONS/__magick_read__.cc
const int divisor = (((1 << QuantumDepth) - 1) / ((1 << depth) - 1));
When graphicsmagick has been compiled with QuantumDepth=32, divisor is always
zero as 1 is implicitly assumed to be a 32 bit integer. I made the following
change:
const unsigned int divisor = (((((long long)1) << QuantumDepth) - 1) / ((1 <<
depth) - 1));
This casts '1' to a long long int, allowing the 32 bit shift.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?35229>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #35229] imread (read_images) fails when QuantumDepth is 32,
anonymous <=