bugGNU Octave - Bugs: bug #65023, print() poor rendering for jpgs

 
 

bug #65023: print() poor rendering for jpgs

Submitter:  None
Submitted:  Tue 12 Dec 2023 09:55:40 PM UTC
   
 
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Need Info Assigned to:  None
Originator Name:  Steve Duncan Originator Email:  -email is unavailable-
Open/Closed:  * Open Release:  * 8.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 14 Dec 2023 08:13:05 AM UTC, comment #5: 

Can you start Octave afresh, with the "-f" switch to make sure no startup file comes in the way and report/upload the result of those commands:


figure ()

## What do the two following commands return for you
get (gcf, "position")(3:4)
get (0, "screenpixelsperinch")

x = rand (1000);
imagesc (x);
title('a random image');

## Can you upload the two files produced by the commands bellow
print toto.jpg
print toto.svg


Pantxo Diribarne <pantxo>
Group Member
Wed 13 Dec 2023 09:15:49 PM UTC, comment #4: 


comment #3:

> This works for me.
>
> By default, the output image should have the same size (with resolution 150dpi) as the original one. For me the onscreen figure is 560x420 pixels (`get (gcf, "position")(3:4)`) with a screen resolution of 95dpi (`get (0, "screenpixelsperinch")`) hence 5.9x4.4 inches onsceen. The printout is 875x656 pixels in size, which is (divide by 150dpi) 5.8x4.4 inches as well.
>
> Do you have some system screen scaling?


No, all I did was upgrade from the default version that comes with Ubuntu 22.04, which I did because I needed the statistics package.  Before the upgrade, plots were fine.

Steve Duncan <shd01>
Wed 13 Dec 2023 09:09:19 AM UTC, comment #3: 

This works for me.

By default, the output image should have the same size (with resolution 150dpi) as the original one. For me the onscreen figure is 560x420 pixels (`get (gcf, "position")(3:4)`) with a screen resolution of 95dpi (`get (0, "screenpixelsperinch")`) hence 5.9x4.4 inches onsceen. The printout is 875x656 pixels in size, which is (divide by 150dpi) 5.8x4.4 inches as well.

Do you have some system screen scaling?

Pantxo Diribarne <pantxo>
Group Member
Wed 13 Dec 2023 08:44:40 AM UTC, comment #2: 

These commands show the problem for me:

x=rand(1000);
imagesc(x)
title('a random image')
print -djpg test

During the print process, the image has shrunk to about 300x300 pixels, whilst the labels have presumably stayed the same size as they were on the screen.





Steve Duncan <shd01>
Wed 13 Dec 2023 06:54:13 AM UTC, comment #1: 

Can you please provide a complete set of commands to reproduce your problematic behavior?

E.g. the following works for me as it used to:


plot (1:10)
xlabel X
ylabel Y
print /tmp/toto.jpg


Pantxo Diribarne <pantxo>
Group Member
Tue 12 Dec 2023 09:55:40 PM UTC, original submission:  

Calling print -d jpg used to create a jpg with a good facsimilie of what was on the screen.  Now it creates a tiny little picture with disproportionate label sizes.

Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55440:  octave_6.3.0.png added by None (313KiB - image/png)
file #55441:  octave_8.4.0.jpg added by None (10KiB - image/jpeg)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by shd01 (Updated the item)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-13 shd01 Attached File- Added randomimage_screenshot.png, #55444
        Attached File- Added randomimage_printed_to_file.jpg, #55445
    2023-12-13 pantxo StatusNone Need Info
    2023-12-12 None Attached File- Added octave_6.3.0.png, #55440
        Attached File- Added octave_8.4.0.jpg, #55441

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code