ports/graphics/pfstools/files/patch-src-pfsview-pfsview_widget.cpp
Kurt Jaeger e648e1ca79 graphics/pfstools: some fixes
- fixes for octave 4.0
- fixes for netpbm
- submitter becomes maintainer

PR:		206239
Submitted by:	Iouri V. Ivliev <fbsd@any.COM.ru>
Approved by:	darius@dons.net.au (maintainer)
2016-02-13 16:34:57 +00:00

22 lines
954 B
C++

--- src/pfsview/pfsview_widget.cpp.orig 2011-04-30 14:01:17 UTC
+++ src/pfsview/pfsview_widget.cpp
@@ -142,7 +142,7 @@ void PFSViewWidget::setFrame( pfs::Frame
// Chose first available channel
pfs::ChannelIterator *it = frame->getChannels();
if( !it->hasNext() ) // TODO: failover
- throw new pfs::Exception( "No channels available!" );
+ throw pfs::Exception( "No channels available!" );
visibleChannel = it->getNext()->getName();
} else if( visibleChannel != COLOR_CHANNELS ) {
// Get a new pointer, as the old frame object
@@ -335,8 +335,8 @@ static void mapFrameToImage( pfs::Array2
assert( !color || (color && B != NULL) );
- float lutPixFloor[257*2];
- QRgb lutPixel[257*2];
+ float lutPixFloor[257*2+1];
+ QRgb lutPixel[257*2+1];
int lutSize;
if( !color && ( negativeTreatment == NEGATIVE_GREEN_SCALE ||
negativeTreatment == NEGATIVE_ABSOLUTE ) ) { // Handle negative numbers