-4

How to Black and White Image in PHP not just grey scale, thank you for consideration i hope you could help me!

Eduard Gamonal
  • 8,023
  • 5
  • 41
  • 46
Albert
  • 327
  • 1
  • 3
  • 16

2 Answers2

0

Try using the imagefilter() function, first with IMG_FILTER_GRAYSCALE to make it grayscale, then with IMG_FILTER_CONTRAST to make it full black and white.

Jesbus
  • 790
  • 8
  • 24
0

Use imagefilter function. Go see it

From PHP documentation:

IMG_FILTER_COLORIZE: Like IMG_FILTER_GRAYSCALE, except you can specify the color. Use arg1, arg2 and arg3 in the form of red, green, blue and arg4 for the alpha channel. The range for each color is 0 to 255.

Use the arguments to adjust your black and white.

P.S. When asking questions in the future, please add more details and what have you achieved so far.

Mariyan
  • 664
  • 6
  • 20