Possible to add imagick webp support for PHP in AWS Linux 2? - imagemagick

I'm running PHP 7.4 on an AWS Linux 2 instance. PHP 7.4 comes with imagick module 3.4.4 compiled by ImageMagick 6.9.10-6, but it doesn't have support for WEBP enabled.
I've installed the libwebp-devel library, but I can't figure out how to recompile the imagick module to support webp. I tried installing from the PECL source a la this comment, but when I check php -i WEBP still isn't listed under supported formats.
I also tried installing ImageMagick from source, and while I was able to get WEBP conversion going in the command line, the PHP extension still doesn't show support.

I'm not currently expert at PHP, but after reading this post Understanding PHP library installation and knowing some linux ecosystem, I think that after recompiling ImageMagick, you have to tell to the imagick module, that you have new version of ImageMagick. Or even recompile module (according to this site: https://help.dreamhost.com/hc/en-us/articles/217253537-Installing-ImageMagick-and-the-imagick-PHP-module-on-Shared-hosting).

Related

How to get Imagemagick to use littlecms2 on WHM Centos 7

I have Imagemagick running fine. However it is missing the lcms2 library that lets it utilise icc color profiles.So it was installed via RPM and also with for different versions of PHP with the PECL php wrapper. I have installed lcms2 also from RPM.
However imagemagick doesn't know anything about lcms2.
How can I add lcms2 delegate/library to my current imagemagick install?
Do I have to make my own build of imagemagick with flags to include lcms2? I hear lcms was removed from the Centos Imagemagick RPM due to security concerns.

Use geolocation plugin in october cms

I have try to install geolocation plugin in october cms
but i am getting errorenter image description here
You posted that your version is PHP 7.0.2 but it supports the array as constant
I guess, PHP version below 5.6 is not supporting this.
may be you are having issue related to version.
reference : https://3v4l.org/T44gG
may be, you did check command line version (CLI version) of php using
php --version
so at there it may be showing you 7.0 but in your apache config you may still using old version.
to confirm that you are also using PHP 7.0 in Apache you can create small php file with below code.
<?php
phpinfo();
then check what version is there.
if its also showing 7.0 then i don't know its something else.
but if its shows 5.x some things then you need to update your apache config
I assume you are on linux machine so, all commands are related to linux op. system
install apache php 7.0 mod (mod = module)
sudo apt-get install libapache2-mod-php7.0
now enable php 7 module before that disable old php5 mod, (sudo a2dismod php5)
sudo a2enmod php7.0
let me know if its works or not.

How to install luagraph using luarocks

I'm trying to use luagraph, a binding to the graphviz library:
http://luagraph.luaforge.net/index.html
To install, I'm using luarocks in Mac OS X. The following command is executed in bash:
luarocks install luagraph
The output is the following:
Installing https://luarocks.org/luagraph-1.0.4-1.src.rock... Using
https://luarocks.org/luagraph-1.0.4-1.src.rock... switching to 'build'
mode
Error: Could not find expected file graphviz/graph.h, or
graphviz/graph.h for GRAPHVIZ -- you may have to install GRAPHVIZ in
your system and/or pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR to the
luarocks command. Example: luarocks install luagraph
GRAPHVIZ_DIR=/usr/local
I have been installed graphviz using homebrew, but I can't figure out how to pass GRAPHVIZ_DIR or GRAPHVIZ_INCDIR properly.
How can I install luagraph?
I've updated LuaGRAPH a couple of weeks ago. It now supports the newest version of Graphviz based on the cgraph library instead of the old graph library.
There is one drawback: I couldn't get luagraph to run on Windows using mingw because of some runtime library issues (compiler and dll compatibility probably). Please look at the README file for more details.
I personally never produced a rockspec for this module. This was created by someone else based on a fork of my luagraph library.
Installation without Luarocks is simple. Download from
https://github.com/hleuwer/luagraph
and follow the instruction in the documentation and the README file. You need adopt a simple config file which is included by make.
Herbert
Well, luaGRAPH is still the top result when searching for lua and graph. So the question is still standing.
And, unfortunately, the answer is: luagraph is OLD, the last update happened before the ubuntu 14.04 was released. And there seem to be some notable changes in the system itself, the flags the error message show do not seem to work. On top of that, graphviz is now about 20 releases newer than the luarock recommends.
There now is a bare bone alternative lua package: graphviz
It is extremely basic, and documentation in not at all informative, but at least it works.
update: Luagraph may be working again, but not through rocks. See the other answer.

Is OpenCV supported on Python 3 yet?

I already have part of a program running in Python 3 but I need OpenCV (or SimpleCV), for a robotic vehicle, but I haven't found any install commands that seem to work, other than for Python 2.7.
If it is compatible could you please include instructions (/links to) for installation of the module?
I am using Ubuntu 14.
Maybe a little late to answer, but it's actually supported on OpenCV version 3 (in alpha state nowadays). I have successfully managed to install it, on MacOS, but I guess it would be similar on Ubuntu.
Now you have separated options for python2 and python3 when using Cmake. So you'll have to set those to make it work. That's all I needed to set:
BUILD_opencv_python3
PYTHON3_LIBRARY
PYTHON3_INCLUDE_DIR
PYTHON3_INCLUDE_DIR2
PYTHON3_NUMPY_INCLUDE_DIRS
...
Here you can find more detailed description: Link
Luigolas is correct that OpenCV 3.0 supports Python 3.x bindings. It was in release candidate status since April and the production version was released on 4 June 2015. Unfortunately for some reason the downloadable installation program on the OpenCV site does not contain a Python 3.x-compatible cv2.pyd file.
OP asked about Ubuntu but for those requiring a Windows installer, use Christoph Gohlke's site, which maintains Windows binaries for many Python packages, including OpenCV 3.0 with Python 3.x bindings. Visit:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv
To install, just download the 64-bit or 32-bit .whl file appropriate for your system, then run pip install [filename]. Then the instruction import cv2 should work in your Python 3.x interpreter.

'mingw32-make' is not recognized in cmd while integrate Qt 5.0.2 and OpenCV 2.4.4 with CMAKE 2.8.10.2 in Windows 7

I was installing QT5 and OpenCV 2.4.4 with CMAKE 2.8.10.2..
I was following the instruction from here and here .
The problem is, when I want to compile the OpenCV library with cmd, 'mingw32-make' is not recognized as internal or external command, operable program or batch file.
I don't know how to react, I've follow the instruction step by step..
Thanks for your answers :)
===============================
This question has been answered :)
the answer is I didn't put the path contains mingw32-make.exe (Qt5.0.2\Tools\MinGW\bin) to system variable. different version different path, made me confuse.
So, if you want to integrate Qt 5.0.2 and OpenCV 2.4.4 with CMAKE 2.8.10.2 in Windows 7, use instructions from two links that I mention it above, it works! Thanks:)
In start menu you can find pre-configured environment variable command prompt link for Qt MinGW. If you are using Qt 5.0.2 for Windows 32-bit (MinGW 4.7, 650 MB) you may find something like Qt 5.0.2 for Desktop (MinGW 4.7). Use it for your command. Please make sure you are using mingw32 version of Qt otherwise the command you are looking for is nmake.

Resources