bugGNU Octave - Bugs: bug #35307, printed bitmaps are the wrong size

 
 

bug #35307: printed bitmaps are the wrong size

Submitted by:  Ben Abbott <bpabbott>
Submitted on:  Sat 14 Jan 2012 02:01:09 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Inaccurate Result
Status: FixedAssigned to: Ben Abbott <bpabbott>
Originator Name: Ben AbbottOpen/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 27 Jun 2013 04:08:24 AM UTC, comment #5:

Hi. The bug is back.

'-S1281,802' gives an image of 1279x800, '-S1282,802' gives an image of 1281x800. I can't get an image of the desired size, 1280x800.

The code from the original submission of this bug gives an image of 1023x767.

Octave 3.6.4, x86_64

Tor Bellino <torbellino>
Tue 17 Jan 2012 12:26:45 PM UTC, comment #4:

I've pushed a changeset to the default branch.

http://hg.savannah.gnu.org/hgweb/octave/rev/df695e37d404

I'm closing this report.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sun 15 Jan 2012 11:35:14 PM UTC, comment #3:

I've attached a first attempt at a changeset. This one fixes the gnuplot backend for me.

On MacOS, fltk-aqua behaves strangely so I'm not getting the correct figure height. Below is a test script that produces a png file with 1023x767 pixels.

With the attached changeset, and using the gnuplot backend, I get the correct size (1024x768). With the fltk backend I get 1024x770. I thought I had reported this bug, but don't see it at the moment in the tracker (I'll need to look more carefully).

(file #24831)

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 14 Jan 2012 03:19:15 PM UTC, comment #2:

The basic problem is that there is no HiResBoundingBox specified in the eps output.

Thus we'll need to make sure that 1pt is an integer number of pixels

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 14 Jan 2012 02:39:10 PM UTC, comment #1:

The problem is that ghostscript is rounding the bbox off in points. When converted to pixels the result can be off +/- (resolution/72).

This can be fixed setting the resolution to 72 and scaling the fontsize by the proper amount.

I'll prepare a changeset and compare with ML's behavior.

Ben Abbott <bpabbott>
Project MemberIn charge of this item.
Sat 14 Jan 2012 02:01:09 PM UTC, original submission:

The short script below produces a figure size of 1023x767

Ben Abbott <bpabbott>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #24831:  changeset.patch added by bpabbott (3KiB - application/octet-stream - first attempt)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by torbellino (Posted a comment)
  • -unavailable- added by bpabbott (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 17 Jan 2012 12:26:45 PM UTCbpabbottStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Sun 15 Jan 2012 11:35:14 PM UTCbpabbottAttached File-=>Added changeset.patch, #24831
      StatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1