Display (bitmap overlay) - page 36 - General Discussion and Assistance - CHDK Forum

Display (bitmap overlay)

  • 355 Replies
  • 75396 Views
*

Offline philmoz

  • *****
  • 3326
    • Photos
Re: Display (bitmap overlay)
« Reply #350 on: 04 / July / 2021, 20:42:26 »
Advertisements
In ximr branch r5983, I adjusted the histogram erase logic to handle histogram modes that display more than one histogram.


Thanks. Google drive builds updated.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Display (bitmap overlay)
« Reply #351 on: 08 / July / 2021, 12:53:16 »
@philmoz

Phil I just posted on my script developments and added a few screen grabs. https://photography.grayheron.net/2021/07/m3-bracketing-exposure-survey-mode.html

These are taken via an HDMI Hollyland Mars X wireless device.

As you can see, the CHDK stuff is offset to the left, other than the central EXIT text.

I wonder if this is fixable, or do I need to just live with it?

Cheers

Garry
« Last Edit: 08 / July / 2021, 17:21:01 by pigeonhill »

*

Offline philmoz

  • *****
  • 3326
    • Photos
Re: Display (bitmap overlay)
« Reply #352 on: 08 / July / 2021, 17:56:17 »
As you can see, the CHDK stuff is offset to the left, other than the central EXIT text.


The HDMI bitmap we draw on is wider than the LCD bitmap (480 pixels vs 360 pixels).
Canon centres the live view to maintain the correct aspect ratio for the image. Canon adjusts it's UI element positions so they remain at the same place relative to the live view.


You could use the get_gui_screen_width value to check for the wider bitmap and offset the elements drawn by your script.
Most of the CHDK UI positions are fixed relative to the top left corner, so the histogram position for example will not change. The 'exit' text is always centred on the bitmap.

CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: Display (bitmap overlay)
« Reply #353 on: 09 / July / 2021, 01:27:29 »
Quote
You could use the get_gui_screen_width value to check for the wider bitmap and offset the elements drawn by your script.

I can’t see this is a script fix, eg my script doesn’t write the text in the bottom left, ie the script’s name.

In the camera all is ok.

The shift is only apparent in the HDMI out.

I guess I’ll be living with the ‘feature’  :) ;)
« Last Edit: 09 / July / 2021, 02:12:58 by pigeonhill »


Re: Display (bitmap overlay)
« Reply #354 on: 11 / July / 2021, 05:01:35 »
@reyalp @philmoz

I wonder if you would consider the following idea?

As you know, when outputting through the HDMI on the M3 there is an offset created, relative to the LCD bitmap.

My thought is to create a new drawing function that globally adjust the x/y position of the stuff that is being drawn and would be called, say, before draw.overdraw() is called.

For EVF and LCD drawing x and y would be zero.

Just a thought.

Cheers

Garry

PS BTW I've added a 'HDMI hack' check in my script to recover the offset, for when I'm recording the HDMI out ;-)

Quote

You could use the get_gui_screen_width value to check for the wider bitmap and offset the elements drawn by your script.


Thanks @philmoz at least the stuff I draw is now auto centred in all three modes: LCD, EVF and HDMI. The only thing not addressed is the script title box, but I can live with that ;-)
« Last Edit: 11 / July / 2021, 13:40:17 by pigeonhill »

*

Offline Caefix

  • *****
  • 526
  • Sorry, busy deleting test shots...
Re: Display (bitmap overlay)
« Reply #355 on: 16 / July / 2021, 10:31:36 »
(ximr) :) If the AF-frame is stable then the OSDs and menues are stable too ...
Now lib.c has ...
Code: [Select]
void vid_bitmap_refresh() {
    extern void _transfer_src_overlay(int);
    int n = active_bitmap_buffer;
    _transfer_src_overlay(n);  // *
    _transfer_src_overlay(n^1);
}
Maybe it´s possible to update both buffers only if needed, save time for zebra ...?  :-*
Code: [Select]
   if (!MF && !script_running && power_on) _transfer_src_overlay(n);  // *
« Last Edit: 17 / July / 2021, 13:10:59 by Caefix »
All lifetime is a loan from eternity.

 

Related Topics