Closed Nialcen closed 9 years ago
Hi, thanks for reporting this bug, it seems to be caused by a recent pull request, please cd
your <your_project>/vendor/coldume/imagecraft/
directory and paste the following command
git branch revert 3786b26b0bb2fae3ad815d1eafec99adeae4f5f8 && git checkout revert
does this fix your problem? Need your feedback, thanks.
I use ssh session with putty :
/imagecraft/vendor/coldume/imagecraft > git branch revert 3786b26b0bb2fae3ad815d1eafec99adeae4f5f8 && git checkout revert fatal: Not a git repository (or any parent up to mount parent ) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
May I ask you a direct link for an archive of the corrected files ?
I have another question, not linked to the current bug, where can I ask ?
How did you install imagecraft? from archive file or composer? Also, you can just ask questions here.
I used an archive file (http://www.imagecraft.cc/web/archive/imagecraft.zip).
It's much more a request than a question but : I use your work to produce animated gif too, wich work flowlessly. However, .gif loose a bit of quality ( normal thing ) and some users start asking .webp format file, that allow animation, but without this much quality lost. I would like to know if you have planed to add an option to save as .webp ? Or not at all ?
Another little thing, but idk if it's from imagecraft or .gif itself : as I use .png as image layer on an animated .gif, if this .png image as shadow using semi-transparency, those shadows do not have proper transparency, creating block color instead.
If you are using the archive file, it should have no problem, may I have your png file that caused the issue? It would be a great sample.
Imagecraft supports some webp images, excluding animated webp. As GD library does not natively support animated webp, and there's little documentation about webp, so I won't write a patch for it.
For your second question, it is an intended behavior, as GIF does not support semi-transparency, and you are putting a PNG on a GIF. See image below: I recommend you to use GIF as your watermark, and the problem will gone.
So the image : http://www.tree-of-savior.fr/wp-content/uploads/2015/09/Sign_1.png : I use it as a background layer, on wich I add other .png as layers.
Thank you for all informations !
Cool, I will examine the image tonight.
I actualy save my png browser side, so the quality is not this good : with image craft the quality is perfect, however, it's on blackbackground^^
I used the example.php
file in the archive, changing the path pikachu.gif
to Sign_1.png
. Here is the output, it seems ok:
What is your output if you do the same on your server?
Well :
Here is the result,
here is the script I use :
$image = $builder
->addBackgroundLayer()
->filename($signatureFond)
->done()
->addImageLayer()
->filename($face)
->resize(100, 150, 'shrink')
->move(0, 0, 'top_left')
->done()
->addImageLayer()
->filename($hair)
->resize(100, 150, 'shrink')
->move(0, 0, 'top_left')
->done()
->addImageLayer()
->filename($hat)
->resize(100, 150, 'shrink')
->move(0, 0, 'top_left')
->done()
->addImageLayer()
->filename($logo)
->move(0, 0, 'top_left')
->done()
->addTextLayer()
->font(__DIR__.'/fonts/amarante.ttf', 30, '#FFF')
->label($texte)
->box($paddings,$color = null)
->done()
->save()
;
if ($image->isValid()) {
file_put_contents($themeRoot . '/signatures/' . $fileName . '.' . $image->getExtension(), $image->getContents());
echo 'http://www.tree-of-savior.fr/wp-content/themes/_tk-master/signatures/' . $fileName . '.' . $image->getExtension() ;
}
else {
echo 'ERROR' ;
echo $image->getMessage().PHP_EOL;
}
Here are the layers I use : $signatureFond : http://www.tree-of-savior.fr/wp-content/uploads/2015/09/Sign_1.png $face : http://www.tree-of-savior.fr/wp-content/uploads/2015/09/Visage_m.png $hair : http://www.tree-of-savior.fr/wp-content/uploads/2015/09/DraTail_m.png $hat : http://www.tree-of-savior.fr/wp-content/uploads/2015/09/hat_0.png $logo : http://www.tree-of-savior.fr/wp-content/uploads/2015/09/Swordman.png $text : Nialcen
So you have all the pieces, the script, and the result I obtain.
Yes, bug confirmed, gonna fix this issue soon.
May I ask you the origin of this ( just curious to understand ). I will have to update some files ?
I'm not sure where the bug come from yet, but you don't have to update any of your files, the API of imagecraft won't change.
Ok, I'll check asa you let me know it's corrected, thank you for you reactivity
Bug fixed. I have also updated the archive file.
Ok, so should I update my files too ?
Yes, please
Thank you !
Hello, first of all, thank you so much, this is wonderfull !
I have only one litlle probleme. As I use a .png with transparent background as addBackgroundLayer , the transparency seems not to be handled.