pixload icon indicating copy to clipboard operation
pixload copied to clipboard

Add pixel-size/image-size control [in progress]

Open sk3lk0 opened this issue 5 years ago • 4 comments

can you add function for change number of pixels? can you add function for change image size?

sk3lk0 avatar Oct 29 '19 08:10 sk3lk0

can you add function for change number of pixels?

Seems like there is no problem to make that on some image formats. Here is the code example: https://github.com/chinarulezzz/pixload/blob/master/gif.pl#L64

It's a "good first issue" for the jpg.pl and png.pl improvement.

The problem appears when we want to specify the pixel size for the "polyglot" images (bmp/gif), where comment symbols /* overwrite pixel information field. A know how to reduce pixel-size, but your proposition needs some research.

can you add function for change image size?

That's non-trivial because of "polyglot" images mentioned above, and payload length that affects image size.

I think that with the addition of pixel-size/payload control we can indirectly control image size. So far in the case of jpg/png. Polyglot images (as i mentioned above) needs some research.

sighook avatar Nov 01 '19 14:11 sighook

thanks.

sk3lk0 avatar Nov 01 '19 14:11 sk3lk0

@sk3lk0 reopened the issue 'cause I can improve when will have time.

sighook avatar Nov 01 '19 14:11 sighook

The pixel-size control currently is implemented in

  • [x] pixload-png
  • [x] pixload-gif
  • [ ] pixload-jpg Skipped since the payload is injected into DQT table or as a comment. Just inject into existing jpg image with desired pixel width/height.
  • [ ] pixload-bmp
  • [ ] pixload-webp

sighook avatar Dec 06 '21 00:12 sighook