Page 1 of 1

DarkenImage command

Posted: Mon Feb 01, 2016 6:10 pm
by marcoagpinto
Hello!

Based on the tips from a forum user, in a topic I created days ago, I created the following procedure:

Code: Select all

; Darken Image procedure, based on the source code from the PB forum
; Image Number, Darken %
;
; V1.0 - 1/FEB/2016
;
Procedure DarkenImage(image_number,darken_percent)
  StartDrawing(ImageOutput(image_number))
  DrawingMode(#PB_2DDrawing_AlphaBlend)
  Box(0, 0, ImageWidth(image_number),ImageHeight(image_number), RGBA(0, 0, 0, 2.5*darken_percent))     
  StopDrawing()  
EndProcedure
I was wondering if Freddy could create such a command to remove the need to have a procedure.

Thanks!

Kind regards,
>Marco A.G.Pinto
---------------

Re: DarkenImage command

Posted: Tue Feb 02, 2016 9:27 am
by Bisonte
marcoagpinto wrote: I was wondering if Freddy could create such a command to remove the need to have a procedure.
Because it's small, simple and specific.
It's the same like Min() and Max() functions.

Re: DarkenImage command

Posted: Tue Feb 02, 2016 9:31 am
by infratec
Hi,

do you want a 'marcoagpinto Basic' :?:

If I send all my small procedures to Fred to include them as native stuff
PB grows a lot :mrgreen:

Simply put all your small procedures in one pbi file and include it in each of your programs.
This has the same effect.

And if you want that it is usable by others: provide a download link.

Bernd

Re: DarkenImage command

Posted: Tue Feb 02, 2016 4:10 pm
by IdeasVacuum
Hi Marco

This is what you need:
ColorEffex - Module