Magic Lantern Forum

Developing Magic Lantern => General Development => Topic started by: Audionut on February 17, 2014, 10:47:54 AM

Title: Transparent ML screenshot overlays / Screenshot overhaul
Post by: Audionut on February 17, 2014, 10:47:54 AM
a1ex has overhauled the screenshot function.

The pull request can be found here (https://bitbucket.org/hudson/magic-lantern/pull-request/424/ppm-screenshots-that-no-longer-rely-on/diff).

Advantages:

Disadvantages:

API change: take_screenshot (now it also accepts a custom file name, which is optional). Any other modules calling this? From ML modules, only raw_rec and mlv_rec use this one, and only for debugging, so do we need to bump the API version because of this change? (I'd say no)

API addition: in the process I've added another API, get_numbered_file_name, to help with numbered sequences of files (here, VRAMnnnn.PPM) and refactored silent pictures with this one. Is this API sufficient to cover our use cases for these file sequences?

I make heavy use of screenshots in raw_diag (will update it after merging this one).

TODO:

Here is an idea of what the new screenshot function can capture.
(https://s15.postimg.cc/z0wqg1xgb/Histo_Zebras.jpg)



Original post:
QuoteDoes anyone know who to make ML screenshots with transparent backgrounds?

For instance, you could have a screenshot of zebras overlayed on the resulting image.

edit:  I assume this is a post processing job.
Title: Re: Transparent ML screenshot overlays
Post by: a1ex on February 17, 2014, 12:06:01 PM
Yes, it's postprocessing. In GIMP, you can layer the BMP on top of the JPG converted from the 422 file, select everything that has the background color, and delete that part.

It is quite easy to output a PPM instead of a BMP+422 (other formats may be more complex), just boring to code. But it will also solve the inconsistency on 5D3, where the BMP may end up on one card (since it's saved by Canon code) and the 422 may end up on the other card (since it's saved by ML code). Not sure if it counts as easy enough for EasyCoding tasks (I'd say just a notch above them, in difficulty).
Title: Re: Transparent ML screenshot overlays
Post by: Audionut on February 17, 2014, 12:20:55 PM
Thanks a1ex.  A bunch of ML overlays should help with the guide I am doing.


This doesn't solve the inconsistency?  https://bitbucket.org/hudson/magic-lantern/pull-request/398/make-core-ml-support-multiple-card-slots/diff
Title: Re: Transparent ML screenshot overlays
Post by: a1ex on February 17, 2014, 12:24:03 PM
No, it's refactoring and backporting the 5D3 FIO wrappers (where ML autodetects the card and fills in the drive letter) to all other cameras.
Title: Re: Transparent ML screenshot overlays
Post by: a1ex on March 03, 2014, 12:18:48 PM
Seems to work: https://bitbucket.org/hudson/magic-lantern/pull-request/424/ppm-screenshots-that-no-longer-rely-on

and should fix most (hopefully all) the inconsistencies from the old dispcheck.
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: dmilligan on March 05, 2014, 10:53:41 PM
For anybody who might be making tutorials or whatnot, I made a little module to take a screenshot after every button press

scrnshot.mo (https://bitbucket.org/dmilligan/magic-lantern/downloads/scrnshot.mo)
source code (https://bitbucket.org/dmilligan/magic-lantern/branch/scrnshot)

(now I just need a script to dump the ppms to an animated gif...)
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: kichetof on March 05, 2014, 11:06:21 PM
Great works !!

Quote from: dmilligan on March 05, 2014, 10:53:41 PM
(now I just need a script to dump the ppms to an animated gif...)

http://jupiter.ethz.ch/~pjt/makingMovies.html :)

convert -delay 20 test*ppm movie.gif
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: dmilligan on March 05, 2014, 11:08:15 PM
Quote from: kichetof on March 05, 2014, 11:06:21 PM
http://jupiter.ethz.ch/~pjt/makingMovies.html :)
thanks :)
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: monograph on March 17, 2014, 07:25:35 PM
dmilligan, your scrnshot module is great ;)
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: LvP on September 21, 2015, 07:41:13 AM
Quote from: dmilligan on March 05, 2014, 10:53:41 PM
For anybody who might be making tutorials or whatnot, I made a little module to take a screenshot after every button press

scrnshot.mo (https://bitbucket.org/dmilligan/magic-lantern/downloads/scrnshot.mo)
source code (https://bitbucket.org/dmilligan/magic-lantern/branch/scrnshot)

(now I just need a script to dump the ppms to an animated gif...)


I have the 600D with the newst nightly on board. But i can not load the scrnshot modul.
What is wrong ? Please help me

(https://dl.dropboxusercontent.com/u/58710866/Bilder/scrnshot_modul.jpg)
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: dmilligan on September 21, 2015, 01:00:36 PM
They are not compatible (the module is too old), either recompile the screenshot module with the latest nightly or use an older build (one from before the module version changed to 6)
Title: Re: Transparent ML screenshot overlays / Screenshot overhaul
Post by: LvP on September 21, 2015, 06:24:02 PM
How can i ascertain which nightly version has the modul version v.5 ? Is it difficult to recompile the screenshot modul to v.6 ?