[07 Jul 2007] Detecting a Brush's Alpha-Channel
[07 Jul 2007] Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 07 Jul 2007 21:31:54 -0000
Is there a way to check if an image has an alpha channel before telling Hollywood how to load the brush---with or without the LoadAlpha option set to "TRUE"?
I would like to be able to get Hollywood to load a variable brush correctly. But as it is right now, if I make LoadAlpha "TRUE" and I happen to select an image that does not have an alpha channel, I get an error message and my program ends. And if I leave LoadAlpha in its default "FALSE" mode, then a selected image that DOES have an alpha channel is loaded without it.
Is there an easy solution to this problem that I have not thought of yet? (In case anyone is wondering, the GetAttribute option #ATTRHASALPHA does not help here.)
Thanks,
Is there a way to check if an image has an alpha channel before telling Hollywood how to load the brush---with or without the LoadAlpha option set to "TRUE"?
I would like to be able to get Hollywood to load a variable brush correctly. But as it is right now, if I make LoadAlpha "TRUE" and I happen to select an image that does not have an alpha channel, I get an error message and my program ends. And if I leave LoadAlpha in its default "FALSE" mode, then a selected image that DOES have an alpha channel is loaded without it.
Is there an easy solution to this problem that I have not thought of yet? (In case anyone is wondering, the GetAttribute option #ATTRHASALPHA does not help here.)
Thanks,
[08 Jul 2007] Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 08 Jul 2007 08:00:53 +0100
Hello rev
Here it is:
Hello rev
Here it is:
Code: Select all
Const #NOALPHA = 1169
ExitOnerror(False)
LoadBrush (1,"guru_bar.bsh",{LoadAlpha=True})
code=GetLastError()
If code<>0
If code=#NOALPHA
LoadBrush (1,"guru_bar.bsh",{LoadBrush=Flase})
Else
x=SystemRequest("An error occured!",GeterrorName(code),"OK")
End
Endif
EndIf
ExitOnerror(True)
- airsoftsoftwair
- Posts: 5833
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
[08 Jul 2007] Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 08 Jul 2007 14:21:17 +0200
In a future version, I might implement a more efficient method.
It's not possible without loading the whole brush. The example described by Zoltan tries to load the brush and then decides upon it. This is somewhat suboptimal, but it's currently the only way to do it.Is there a way to check if an image has an alpha channel before telling Hollywood how to load the brush---with or without the LoadAlpha option set to "TRUE"?
I would like to be able to get Hollywood to load a variable brush correctly. But as it is right now, if I make LoadAlpha "TRUE" and I happen to select an image that does not have an alpha channel, I get an error message and my program ends. And if I leave LoadAlpha in its default "FALSE" mode, then a selected image that DOES have an alpha channel is loaded without it.
Is there an easy solution to this problem that I have not thought of yet? (In case anyone is wondering, the GetAttribute option #ATTRHASALPHA does not help here.)
In a future version, I might implement a more efficient method.
- airsoftsoftwair
- Posts: 5833
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
[08 Jul 2007] Re: Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 08 Jul 2007 14:22:53 +0200
By the way: You shouldn't use these error codes directly because they are different in different Hollywood versions. In 2.5 the code for "no alpha channel" is indeed 1169 but this only is the case in 2.5. In other versions, the code is different.Hello rev
Here it is:
Const #NOALPHA = 1169
[08 Jul 2007] Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 08 Jul 2007 16:06:14 +0100
Hello Andreas
Thanks to mention it. However it is important only in uncompiled sources e.g. for the applets. By the way what is the matter with the Hollywood player?
Regards!
Hello Andreas
Thanks to mention it. However it is important only in uncompiled sources e.g. for the applets. By the way what is the matter with the Hollywood player?
Regards!
- airsoftsoftwair
- Posts: 5833
- Joined: Fri Feb 12, 2010 2:33 pm
- Location: Germany
- Contact:
[08 Jul 2007] Re: Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 08 Jul 2007 22:07:42 +0200

But I can give you a screenshot at least so you can see how it looks (see attachment)
Well, it's finished since a long time and when I compile Hollywood, the players are always created too. But I won't release it currently because I'm still thinking about several changes which I could no longer make if the player was available. Thus, the archive containing the Hollywood players for all platforms currently resides ready-to-be-uploaded-to-Aminet on my hard-disk, but it's not going to be released any time soon... maybe for Hollywood 3Hello Andreas
Thanks to mention it. However it is important only in uncompiled sources e.g. for the applets. By the way what is the matter with the Hollywood player?
But I can give you a screenshot at least so you can see how it looks (see attachment)
[08 Jul 2007] Re: Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sun, 8 Jul 2007 14:14:41 -0700 (PDT)
What a great trick!
Thank you very much.
What a great trick!
Thank you very much.
[09 Jul 2007] Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Mon, 09 Jul 2007 00:10:17 +0100
Hello Rev.
Next question ... ?
Hello Rev.
You are welcome!What a great trick!
Thank you very much.
Next question ... ?
[14 Jul 2007] Re: Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 14 Jul 2007 12:38:31 -0700 (PDT)
Yep, you helped get me past a really tough spot in bringing ExtraInfo to life. Thanks again!
I actually released version 1.0 prematurely last night, and I already needed to upload a slightly improved 1.1 today. I'm glad you like it.
Yep, you helped get me past a really tough spot in bringing ExtraInfo to life. Thanks again!
I actually released version 1.0 prematurely last night, and I already needed to upload a slightly improved 1.1 today. I'm glad you like it.
[14 Jul 2007] Re: Detecting a Brush's Alpha-Channel
Note: This is an archived post that was originally sent to the Hollywood mailing list on Sat, 14 Jul 2007 21:11:57 +0100
Hello Paul!
At last we are already know what was your problem
ExtraInfo is a good job and very nice idea!
The exif info feature is very comprehensive. I am looking for adding ExtraInfo to a DirOpus button.
Keep up the good work! Oh, and I definitively want to be "bloated" with your stuffs.
Bye!
Hello Paul!
At last we are already know what was your problem
The exif info feature is very comprehensive. I am looking for adding ExtraInfo to a DirOpus button.
Keep up the good work! Oh, and I definitively want to be "bloated" with your stuffs.
Bye!