ixnode / php-cli-image

This library converts a given image to ASCII string
MIT License
3 stars 0 forks source link

Increase resolution #1

Open d47081 opened 5 months ago

d47081 commented 5 months ago

Hello and thanks for this amazing library!

I'm trying to use it for CLI captcha generation based on this library.

As understand, there is no way to make image smaller or increase the resolution because symbols are hardcoded But maybe I have missed some trick or the API option

Here is my captcha example, that takes lot of space in terminal:

2024-04-30_04-36 2024-04-30_04-37

I can operate with the width attribute only but no luck to reduce it less than 50 value:

$image = new \Ixnode\PhpCliImage\CliImage(
    $captcha->get(),
    50 // that is min possible value in my case
);
bjoern-hempel commented 4 months ago

Hey! Thank you for using my library. I have added a width parameter to the Cli Command with the new version 0.1.3. This shows the use of the second parameter $width from the CliImage class:

image

vendor/bin/php-cli-image ci CAPTCHA.jpg --width 30

It shows the successful use of the parameter width in every interpretation:

image

Can you define your issue and problem a little more precisely? What happens if you enter a lower or higher value than 50?