Page 1 of 1
GEORGE : tv_imageIsEmpty layerID iPosition
Posted: 30 Oct 2014, 10:44
by Mads Juul
I would like a George command to quickly tell if an image is empty
Something like
Code: Select all
GEORGE : tv_imageIsEmpty layerID iPosition
RETURN bool
1 if image(frame) is empty. 0 if something is drawn on the image
I know there is ways to do this with George for instance with tv_layercompareimage
But I would prefer a simpler solution that didn't inklude making new empty instances or layers
-Mads
Re: GEORGE : tv_imageIsEmpty layerID iPosition
Posted: 30 Oct 2014, 11:42
by ZigOtto
Mads Juul wrote:I would like a George command to quickly tell if an image is empty
Something like
Code: Select all
GEORGE : tv_imageIsEmpty layerID iPosition
RETURN bool
1 if image(frame) is empty. 0 if something is drawn on the image
I know there is ways to do this with George for instance with tv_layercompareimage
But I would prefer a simpler solution that didn't inklude making new empty instances or layers
-Mads
I would prefer something like that ( "0" for "Empty" seems to me more intuitive) :
Code: Select all
GEORGE : tv_ImageContents layerID iPosition
RETURN bool
- 0 if image(frame) is empty,
- 1 if something is drawn on the image //pixel(s) with alpha > 0
Re: GEORGE : tv_imageIsEmpty layerID iPosition
Posted: 30 Oct 2014, 11:45
by Mads Juul
ZigOtto wrote:
I would prefer something like that ( "0" for "Empty" seems to me more intuitive) :
I agree.
Re: GEORGE : tv_imageIsEmpty layerID iPosition
Posted: 30 Oct 2014, 12:14
by Svengali
A quick way is to capture the complete frame into a cutbrush, optimize the cutbrush and check its dimensions... of course you would probably want to somehow temporarily store the current cutbrush or animbrush image so you could restore it after the test.
Sven
Re: GEORGE : tv_imageIsEmpty layerID iPosition
Posted: 30 Oct 2014, 12:22
by Mads Juul
Svengali wrote:A quick way is to capture the complete frame into a cutbrush, optimize the cutbrush and check its dimensions... of course you would probably want to somehow temporarily store the current cutbrush or animbrush image so you could restore it after the test.
Sven
I know but it is slow . I also have a different feature request for optaining the dimension of an image here
viewtopic.php?f=21&t=7762&p=73627&hilit ... und#p73627
In the thread I also briefly discusses the problems involving using the cutbrush method.
Re: GEORGE : tv_imageIsEmpty layerID iPosition
Posted: 30 Oct 2014, 13:15
by Svengali
Mads Juul wrote:I know but it is slow . I also have a different feature request for obtaining the dimension of an image In the thread I also briefly discusses the problems involving using the cutbrush method.
Forgot dat. Having a George command for dimensions of a cutbrush and another that tests for a blank frame would be useful, especially inside a script that does other things as well.
so +1.
Sven