ImageMagick and PNG - linux

I'm trying to install ImageMagick but everytime, the libpng isn't used.
When I'm running
identify -version
png does not appear in the list.
I'm retrying to install properly ImageMagick with these commands:
./configure --enable-shared
make libdir=/usr/lib64
make libdir=/usr/lib64 install
./configure --enable-shared=yes --x-libraries=/usr/lib64 --without-perl
make
make install
after in found libpng in /usr/lib64 on my system.
But after
make libdir=/usr/lib64 install
I always have this
DELEGATES = bzlib mpeg freetype jpeg lcms ps tiff x zlib
and no png is listed.
I'm still in trouble. I don't know where is my mistake.
I'm working on CentOS 6.6.

Try to add --with-modules to your configure options.
Also, inspect the output of your ./configure ... command for error and warning messages.
Most Linux distros package the runtime libraries separately from the compile-time header files. You may need to install an additional package named libpng-dev or libpng-devel to get the header files onto your system which are needed to compile ImageMagick with PNG support.

Related

Missing ncurses header file

I am using fedora16 in vmware but there is no ncurses header file. so i cannot practice with ncurses, how can I install ncurses header file.
Fedora 16 is rather old, but if you can get to a workable yum server, you can install the ncurses-devel package to get the header files.
Since you use fedora then doing the following installs ncurses on fedora:
First, go to rpmfind.net then search for ncurses and download the package according to your architecture. Then do the following to install the package:
rpm -i </Path/Package_name.extension>
Or alternatively, you can download the source code and compile it yourself by:
tar zxvf Ncurses_packageName.tar.gz
cd Ncurses_packageName
./configure
make
sudo make install

How to get CRFSuite to work on Mac OS X?

I am trying to get CRFSuite to work on Mac OS X. The author only has binaries for Windows and Linux, but does provide the source package. I am guessing I need to somehow compile the source into a Mac OS X executable? This I have no idea how to do. I did some research on this, but nothing actually works. I also asked a PhD student at the university specifically this problem--he told me it would be very difficult.
I have been able to get CRFSuite to work by using WineSkin, but that's a workaround and not a real solution.
Ideally when I open the Terminal I should be able to invoke CRFSuite by just typing "crfsuite" and not jumping through hoops to pipe commands to a WineSkin Windows Terminal.
It's easy with homebrew.
First go to homebrew website - here and install it. It is very simple.
Then do the following in Terminal:
brew tap brewsci/science
brew install crfsuite
If anything goes wrong, use
brew doctor
Once you are up and running, I find it a good idea to occasionally do the following to upgrade brew itself and the installed packages:
brew update
brew upgrade
There are lots of gret, up-to-date packages that are so easy to install using homebrew, I use the following:
ant
basex
cmake
coreutils
exiftool
exiv2
faac
ffmpeg
fontconfig
freetype
gawk
gd
gettext
ghostscript
gnu-sed
gnuplot
ilmbase
imagemagick
jasper
jbig2dec
jhead
jp2a
jpeg
lame
leptonica
libpng
libtiff
libtool
lighttpd
little-cms2
lua
lynx
mad
netpbm
opencv
openexr
openssl
p7zip
parallel
pcre
perlmagick
pipebench
pipemeter
pkg-config
platypus
proftpd
pv
qt
readline
redis
sleuthkit
sox
sqlite
sqlitebrowser
tag
tesseract
tree
wget
x264
xvid
xz
If you want to look for additional packages, just use:
brew search <search string>

How do I configure a JPEG delegate for graphicsmagick?

I want to crop an image to a specified pixel region. I'd like to use the gm module from https://github.com/aheckmann/gm.
I am running Linux Mint 13 and node.js v0.9.4pre.
I am running into an error that sounds like graphicsmagick doesn't know about jpegs:
Error: Command failed: gm convert: No decode delegate for this image format (./assets/images/temp/2aadd4379e1cf2b59429994270db2a8a.jpg)
Sure enough, gm convert -list formats shows no jpeg delegate:
<snip>
IPTC P rw- IPTC Newsphoto
IPTCTEXT P rw- IPTC Newsphoto text format
IPTCWTEXT P rw- IPTC Newsphoto text format
K25 S r-- Kodak Photo RAW
<snip>
graphicsmagick has a ftp folder containing source code for delegates (with a readme.) So I downloaded, untarred, and installed jpegsrc.v6b.tar.gz as suggested in both the install document that came with my source files.
I'm pretty sure the jpeg library installed cjpeg and djpeg and perhaps other stuff. However there is no make uninstall or manifest that I found. I haven't tried installing any other versions of the jpeg library over this one. I uninstalled and rebuilt graphicsmagick after installing the jpeg library.
Still, there is no JPEG delegate listed in gm convert -list formats.
I am migrating from Imagemagick which never had any problems resizing jpegs, even without my installing this library.
What must I do to get graphicsmagic to handle jpegs?
Here's how I am invoking gm:
var gmagic = require('gm');
gmagic(cfg.tmpPath)
.crop(h,w,x0,y0)
.write(cfg.croppedPath, function(err){
if(err){ done(err) }
else { done(null, cfg.croppedPath) };
});
Here are the commands I used to install the jpeg library and graphicsmagick:
$ cd ~/source
$ wget http://www.ijg.org/files/jpegsrc.v6b.tar.gz
$ tar -xzvf jpegsrc.v6b.tar.gz
$ cd jpeg-6b
$ ./configure
$ make
$ sudo make install
$ cd ~/source
$ wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.18.tar.xz
$ tar -xJvf GraphicsMagick-1.3.18.tar.xz
$ cd GraphicsMagick-1.3.18
$ ./configure
$ make
$ sudo make install
$ npm install gm
I found a successful workaround by telling the gm library to use imagemagick binaries instead of default graphicsmagic binaries:
var gmagic = require('gm');
var imagic = gmagic.subClass({imageMagick: true});
...
imagic(cfg.tmpPath)
.crop(h,w,x0,y0)
.write(cfg.croppedPath, function(err, stdout, stderr, command){
if(err){ next(err) }
else { next(null, raft) };
});
Given that you are using Linux Mint, the best solution for GraphicsMagick to find libjpeg is to install the libjpeg development package (libjpeg-dev), re-run the GraphicsMagick configure script, rebuild, and install. Be sure to add -dev packages for libraries supporting other formats you are interested in.
If you want to use the libjpeg installed from source code, then you will need to add the options LDFLAGS=-L/usr/local/lib CPPFLAGS=-I/usr/local/include to the GraphicsMagick configure script invocation. Be aware that Linux Mint may come with a different libjpeg than jpeg 6b (e.g. jpeg 8 or libjpeg turbo) and it is best not to have duplicate libraries on the system.
I realise this is strictly a Linux question, but maybe this will help someone...
On Mac, I used HomeBrew instead. Just run these 3 lines (the chown line was necessary for me, you might want to try without first):
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
sudo chown -R $USER:admin /usr/local
brew install graphicsmagick
If it complains about jpeg libraries being unlinked, run brew doctor + follow instructions to link any missing "kegs".
And if something gets messed up and you want to start over (see https://stackoverflow.com/a/17846596/188926):
brew uninstall imagemagick graphicsmagick libpng jpeg
brew cleanup -s
brew install graphicsmagick

XLib Error when compiling QT for ARM using linux-arm-gnueabi-g++

I am having some issues compiling a QT program from an i386 Ubuntu Linux PC to a Pandaboard.
We were successful in creating a build which could create a console application from my PC to a Pandaboard, but when I try to use a program with a GUI, I receive a missing symbol error.
We are trying to build a program which runs directly on the Ubuntu system on the ARM device.
We do not want to run the program as embedded, but as a stand-alone QT application.
I am having an issue with the X11 Display Drivers I believe.
Below is the error I am receiving when running my ./configure:
XLib functionality test failed! You might need to modify the include and library search paths by editing QMAKE_INCDIR_X11 and QMAKE_LIBDIR_X11 in /home/vantage/QT_ARM_GUI2/qt-everywhere-opensource-src-4.8.4/mkspecs/linux-arm-gnueabi-g++.
Below are the items I have installed on the current build:
libfontconfig1-dev
libfreetype6-dev
libx11-dev
libxcursor-dev
libxext-dev
libxfixes-dev
libxft-dev
libxi-dev
libxrandr-dev
libxrender-dev
sudo apt-get install build-essential automake autoconf libtool
sudo apt-get install g++-arm-linux-gnueabi
sudo apt-get build-dep qt4-qmake
Below is my current PATH variable:
/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/vantage/QT/arm-2012.09/bin:/home/vantage/QT/xc/include/X11:/home/vantage/QT/xc/lib/X11:/usr/lib/xorg:/usr/include/xorg
I am using the following build of QT:
qt-everywhere-opensource-src-4.8.4
I am using the below toolchain:
arm-2012.09-64-arm-none-linux-gnueabi-i686-pc-linux-gnu from codesourcery
Below is my Config statement:
./configure -arch arm -nomake demos - nomake examples - nomake docs -no-qt3support -release -platform linux-g++ -xplatform qws/linux-arm-gnueabi-g++ -declarative -xmlpatterns -exceptions -make tools -make libs -little-endian
I have edited my linux.conf file and changed the QMAKE_LIBDIR_X11 to point to /usr/lib/xorg and my QMAKE_INCDIR_X11 to /usr/include/xorg.
I have also edited my linux-arm-gnueabi-g++ -> qmake.conf file to match the above include and lib directories.
I have also tried to point these directories to the library and include files I received from "http://www.x.org/archive/X11R6.8.1/src-single/X11R6.8.1-src.tar.bz2" which I exported to home/vantage/QT/xc/.
I have been following the below article, attempting to work through the errors but I am still receiving the issue with Xlib.
"http://qt-project.org/forums/viewthread/17193"
Any direction or assistance would be greatly appreciated.
Thank you in advance
I think you should try to provide all these installed libs i.e. libX11 etc. in qmake.config file in Qt source.
once you include cross compiled libs and headers then it should work.

How to install X264

I'm trying to make a program. When I run ./configure, this is what I get:
checking for X264... configure: WARNING:
Test application not built (x264 codec missing).
Either you have not installed x264, or you
have not installed it with the Gtk+ interface.
If you compile it from source, add these options
to configure:
--enable-shared
--enable-gtk
I have installed various packages that are related to x264 and gtk, but I'm still getting this message. Which packages do I need to install?
I used this howto to install ffmpeg and x264 on my machine...

Resources