bob
bob

Reputation: 117

Using PHP to change image brightness

I have written code for a client to upload images to their website. They have now asked if it is possible to add a facility to change the brightness of the images once they are uploaded (permanent change to the images). I did explain that it's probably easier to change this before uploading but decided to investigate anyway, so my question is: Is there anyway of changing image brightness permanently using php?

Upvotes: 3

Views: 1567

Answers (1)

Aniket Sahrawat
Aniket Sahrawat

Reputation: 12937

You can use imagefilter for this task:

$bool = imagefilter($img, IMG_FILTER_BRIGHTNESS, 10); // arg3 can be -255 to +255

Upvotes: 4

Related Questions