bugGNU Octave - Bugs: bug #62149, getframe on MacBook Pro 14"...

 
 

bug #62149: getframe on MacBook Pro 14" doesn't show full plot

Submitter:  masum
Submitted:  Mon 07 Mar 2022 08:23:31 PM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 6.4.0 Release: 
Operating System:  * Mac OS Fixed Release:  9.2.0
Planned Release:  9.2.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 14 May 2024 08:42:25 AM UTC, comment #5: 

Thank you for testing with the release candidate.

The function `getframe` grabs the pixels as they are displayed on-screen and writes them to a file (no additional rescaling). IIUC, macOS's Retina displays use a DPI scaling factor of 200%. That means that it is expected that files that are created by `getframe` have 4 times more pixels on a Retina display than on a non-Retina display. Depending on the compression algorithm of the image file format that might result in files that can be approx. 4 times larger.

Afaict, you are seeing the expected behavior for that function.

Closing as fixed for version 9.2.0.

Markus Mützel <mmuetzel>
Group administrator
Tue 14 May 2024 07:45:41 AM UTC, comment #4: 

comment #3:

> Is this still an issue with the release candidate for Octave 9.2.0?
> See: https://octave.discourse.group/t/release-candidate-for-octave-9-2-0-available/5579/4
>


I've tested this build, and it works, with the following code:


figure (1); plot (1:10)
figure (2); imshow (getframe (1).cdata)
imwrite(getframe (1).cdata, 'export.gif', 'gif')


One difference is there, the file size is 330 kB when I run it using a low pixel density monitor and on the integrated HDPI Monitor the file size is 1.3MB. Pictures attached.

(file #56046, file #56047)

masum
Tue 07 May 2024 12:09:11 PM UTC, comment #3: 

Is this still an issue with the release candidate for Octave 9.2.0?
See: https://octave.discourse.group/t/release-candidate-for-octave-9-2-0-available/5579/4

Markus Mützel <mmuetzel>
Group administrator
Wed 12 Jul 2023 07:39:37 AM UTC, comment #2: 

Hi everyone,

the Problem with using getframe on HDPI monitors is still existing in Octave 8.2.0

Does someone have an idea how to fix this?

Thank you in advance.

masum
Thu 09 Jun 2022 10:48:14 AM UTC, comment #1: 


Problem Still exists in V7.1

Work around is to use a second screen which is not HDPI and place all windows there. in this case getframe() can capture the image. So it definitely is caused by the screen

masum
Mon 07 Mar 2022 08:23:31 PM UTC, original submission:  

Using getFrame on 14" MacbookPro with Retina XDR Display

The resulting data only shows the bottom left quarter of the initial plot.

Code example
'''
figure (1); plot (1:10)
figure (2); imshow (getframe (1).cdata)
imwrite(getframe (1).cdata, 'export.gif', 'gif')
'''

Comparison with a windows version of the same code doesn't show this behavior

masum

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #56046:  export_HDPI_9_1_90.gif added by masum (1MiB - image/gif)
file #52966:  export.gif added by masum (322KiB - image/gif - Resulting plot)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by masum (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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-05-14 mmuetzel StatusNeed Info Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 9.2.0
        Planned ReleaseNone 9.2.0
    2024-05-14 masum Attached File- Added export_low_density_9_1_90.gif, #56048
    2024-05-14 masum Attached File- Added export_HDPI_9_1_90.gif, #56046
        Attached File- Added export_low_density_9_1_0.gif, #56047
    2024-05-07 mmuetzel StatusNone Need Info
    2022-03-07 masum Attached File- Added export.gif, #52966

    Back to the top

    Powered by Savane 3.15-e6e5.
    Corresponding source code