bannsec / stegoVeritas

Yet another Stego Tool
GNU General Public License v2.0
357 stars 38 forks source link

png colortype rgb with alpha not supported by PIL #39

Closed brubsby closed 1 year ago

brubsby commented 1 year ago

getting this when trying to run stegoveritas on a png with transparency, my guess is the version of PIL doesn't support it, but this might not actually be integral to the operation of stegoveritas. figured it was worth an issue though

ERROR:stegoveritas.helpers:not supported for this image mode
ERROR:stegoveritas.helpers:
"""
Traceback (most recent call last):
  File "/usr/lib/python3.10/multiprocessing/pool.py", line 125, in worker
    result = (True, func(*args, **kwds))
  File "/home/brubsby/.local/lib/python3.10/site-packages/stegoveritas/modules/image/analysis/filters.py", line 33, in run_image_op
    img = op(image.file)
  File "/home/brubsby/.local/lib/python3.10/site-packages/PIL/ImageOps.py", line 155, in autocontrast
    return _lut(image, lut)
  File "/home/brubsby/.local/lib/python3.10/site-packages/PIL/ImageOps.py", line 60, in _lut
    raise OSError(msg)
OSError: not supported for this image mode
"""

running stegoveritas on wsl2 on win11

bannsec commented 1 year ago

Yeah that's not actually an error. Basically, I just ask PIL to do transforms regardless and some of them based on the format it just can't do. I've switched it over to simply give a warning instead of an error to help avoid confusion.

Commit: c0568cf

Thanks!