Opened 14 years ago

Last modified 6 years ago

#138 new defect

PNG_driver: boundary at right side is one Pixel off

Reported by: schulzea Owned by: grass-dev@…
Priority: major Milestone: 6.4.6
Component: Default Version: unspecified
Keywords: PNG_driver Cc:
CPU: Unspecified Platform: Unspecified

Description

I want to export an image with the PNG driver, but there seems to be a problem. Always I get a vertical line with 1 Pixel width. I use the following configuration for the export:

export GRASS_WIDTH=317

export GRASS_HEIGHT=317

export GRASS_PNGFILE=$GISDBASE/tester.png

export GRASS_TRANSPARENT=TRUE

export GRASS_TRUECOLOR=TRUE

d.mon start=PNG

d.rast map=tester

d.mon stop=PNG

r.info for this raster shows col=317 and row=317

When I use r.out.pgn everything is fine. I get an image (317x317) without this vertical line. But I need the transparence.

I use grass 6.2.2 under Ubuntu. Is an error of myself or a bug?

Attachments (1)

tester2.png (224.5 KB ) - added by schulzea 14 years ago.

Download all attachments as: .zip

Change History (6)

by schulzea, 14 years ago

Attachment: tester2.png added

comment:1 by martinl, 14 years ago

Milestone: 6.4.0

comment:2 by neteler, 14 years ago

Seems to be related to #72 (PNG driver: boundary rendering is off by one pixel)

comment:3 by hamish, 14 years ago

d.out.file is another method to test. All d.out.file and d.out.png do is setup and run the PNG driver for you.

you could try setting: export GRASS_TRANSPARENT=TRUE

before running d.out.png if you want it to have transparency.

I use grass 6.2.2 under Ubuntu.

can you test to see if it is still there in 6.3.0?

Hamish

comment:4 by schulzea, 14 years ago

well, I test it with version 6.3.0. The same result. And I tried d.out.file and d.out.png. Without success. And both use the PNG-Driver. I'm right?

It seems to be a problem with the PNG-driver. The strange is, that no data is lost. But I get an additional vertical line of one pixel at the right side of the image. But the dimension of my result image is still 317x 317.

I don't understand this.

Alex

comment:5 by neteler, 6 years ago

Milestone: 6.4.06.4.6
Note: See TracTickets for help on using tickets.