kosinix / grafika Goto Github PK
View Code? Open in Web Editor NEWAn image processing library for PHP
Home Page: https://kosinix.github.io/grafika
License: MIT License
An image processing library for PHP
Home Page: https://kosinix.github.io/grafika
License: MIT License
when i do with blend
$image->getCore()->setImageOpacity($opacity);
php got an error,Call to undefined function setImageOpacity???
PHP Version 7.1.8
imagick module version 3.4.3
Imagick compiled with ImageMagick version ImageMagick 7.0.1-8 Q16 x86_64 2017-07-10
the blend function 's opacity param must be 1, when is 1.0 and the image2 is a png,the result image is not right,the image2 will be white background color
imagick库可以设置字间距
$draw->setTextKerning($kerning);
于是我在text方法中加入了setTextKerning方法,由于GD库没有这个方法,使用时可以判断是GD库还是imagick库,希望新版本能加上
Excellert lib! The only notable thing missing here is horizontal and vertical flip
Like this http://image.intervention.io/api/flip or https://github.com/claviska/SimpleImage#method-examples
I can't use getVersion check this version.
This function setImageOpacity not support.
This function is deprecated from last stable version (3.4.4 - 2019-05-02) of PECL Imagick extension.
RE: Version pulled during April 2017.
When resizing an image the final size appears slightly blurry when output to JPEG even when quality is set to 100%. It seems as if the 100% value is being ignored and the default 75-80% is being applied. The blurriness happens even if the image is resized the slightest amount and when any acceptable format was the original source (JPEG, GIF, PNG).
The following screenshot compares a Photoshop resize to a Grafika resize of the same amount using the same source file. Both files were resized by 75%. Pay close attention to the wording at the top of the box "new", "take pills easily" etc. The Grafika version more blurry and is an issue with the stakeholders of my project.
While I do not expect Grafika to be Photoshop, this is an issue for presentation.
Has anyone experienced this too?
I t seems that in Grafika/Imagick/Editor.php lines 179 and 180 X and Y offsets are added to the $x and $y params.
But it seems that the offsets are already added at Grafika/Position.php on lines 119 and 120 right? Those values are used to initialize $x and $y later in the first place.
So Grafika/Imagick/Editor.php lines 179 and 180 can be just removed?
when I rotate png images colored border will appear according to rotation angle.
now I can set the color but it cant be transparent and with no color.
$color=new Color('ffffff',0.0);
$editor->rotate($image,$rotation[$i],$color);
$color=new Color('ffffff',1.0);
$editor->rotate($image,$rotation[$i],$color);
both are equal!
求支持php8或更高
hi,
I want to rotate a image by use follow code, but the result is same, the rotate image same with original image. How worte this code?
Alex
open( "./images/list_1.jpg" ); $editor->rotate(90); $editor->save( "./images/list_1_rotate.jpg", null, 90 ); $editor->free();grafika/src/Grafika/Imagick/Editor.php
Line 381 in 211f61f
根据php文档 https://www.php.net/manual/en/imagick.setimageopacity.php
This function has been DEPRECATED as of Imagick 3.4.4. Relying on this function is highly discouraged.
需要更改为 setImageAlpha()
图片添加文字时,会有透明背景。是需要改哪里吗,现在图片不能上传0.0
Not to discourage this great effort. Just curious.
添加中文字体时,指定好中文字体文件了,但是生成好的图片有背景,这个怎么搞啊,还是这个里面的bug,所有的中文字体都是有背景的。
Is this project still alive?
No supported editor
I try resize a image and show error
Exception in GifHelper.php line 292:
Error decoding GIF.400 247256
the image: https://67.media.tumblr.com/tumblr_mbiqec1JUw1ri1mxoo1_400.gif
Current API just creates a black image:
Grafika::createBlankImage(100,100);
With the new API, we add a third param Color. Below creates a blank canvas with a transparent white background:
use Grafika\Grafika;
$image = Grafika::createBlankImage(100,100, new Color('#FFFFFF', 0.0));
Hi,
There's an error thrown by Gd Editor when using smart crop on portrait images when the provided width of crop is equal or larger to that of the original image.
ex:
$image; // width = 200px, height = 500px
$image->crop($image->getWidth(), $image->getHeight());
// -> throws error
When I crop with $image->getWidth() - 1
, it works, but then the image is 1px less than what I need
Also, it only does this with smart crop, other crop methods work.
Is it enough info?
Cheers!
如何创建一张圆角png图片?
找了半天,Google baidu bing 都没有解决的案例.
我觉得不应该啊.这是很正常的需求吧.
图片1=网络地址
图片2=网络地址
通过grafika 合成 得到图片三 为二进制 base64 格式 进行输出.
Is there any functionality to work with EXIF data, for example deleting some info?
I have a Laravel application that uses Grafika and had been working for months if not years.
Without touching anything in my code, I installed the ImageMagick php extension and now I get this error:
Error:
Call to undefined method GdImage::getPixelIterator()
at /srv/www/iframe.xxxx.com/vendor/kosinix/grafika/src/Grafika/Imagick/Filter/Dither.php:60
at Grafika\Imagick\Filter\Dither->diffusion()
(/srv/www/iframe.xxxx.com/vendor/kosinix/grafika/src/Grafika/Imagick/Filter/Dither.php:40)
at Grafika\Imagick\Filter\Dither->apply()
(/srv/www/iframe.xxxx.com/vendor/kosinix/grafika/src/Grafika/Imagick/Editor.php:38)
at Grafika\Imagick\Editor->apply()
(/srv/www/iframe.xxxx.com/app/IFrame/Application.php:132)
The mere act of adding the ImageMagick extension (without modifying my code to use it in any way) has made this error appear.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.