GraphicsMagick with LIBPNG library - libpng

How should ./configure args look like in order to make install to build graphicsmagick with support of JPG conversion?
This is what I've been doing so far (which not working out):
./configure LDFLAGS="-L/Users/my_user/Downloads/libpng-1.6.10" LIBS="-libpng"

You need to install all the external libraries that you want to support before running the configure command.
At the moment, you've got only PNG support. If you want to support JPEGs, you need to install libjpeg. There are different ways to do so depending on your operating system (Mac or Linux?), or you can grab the sources and compile it yourself with the same commands (./configure, make, sudo make install).
Of course, if you want to support JPEG 2000, TIFF, etc you need to install the corresponding libraries too. See README.txt for more info and link on what libraries are needed to read what format.
I don't think you need to pass the LIBS="-libpng" to configure, GraphicsMagick should add it by default as long as it's being built with PNG support. You still need the LDFLAGS though as libpng is not "installed" and in a standard path. GraphicsMagick looks into /usr/local/lib by default so if you install the library it should be picked up without you having to do anything.
You can have a look at the text files at the root of GraphicsMagick's archive, there is a README.TXT and INSTALL-unix.txt, they might prove handy.

Related

How to tell ImageMagick's configure where to find Libpng and Zlib?

I was going through this old post Compile ImageMagick from source with PNG support on OSX.
I did mostly all of what it says with minor changes. Libpng and Zlib are in the following paths
/usr/local/libpng
/usr/local/zlib
When trying to configure ImageMagick 7.0.5-7 I do it like
./configure --prefix=/usr/local/imagemagick
CPPFLAGS='-I/usr/local/libpng/include -I/usr/local/zlib/include'
LDFLAGS='-L/usr/local/libpng/lib -L/usr/local/zlib/lib'
--enable-shared --enable-delegate-build
But still png and zlib are marked as
ZLIB --with-zlib=yes no
PNG --with-png=yes no
In some other website I read that I should add to the system variable PKG_CONFIG_PATH the path to the .pc files. So before running configure I tried also
export PKG_CONFIG_PATH=/usr/local/libpng/lib/pkgconfig:/usr/local/zlib/share/pkgconfig/
but still the libraries are not recognized.
Anyone around that knows how to tell the configure script where to look for the libraries?
I got it working !
After exploring the configure file I figured out that what was missing was pkg-config tool.
I just download it from this site installed it.
Run the command above and it works fine now.

Where is OpenCV source code (.cpp) on Ubuntu?

I did not download and unzip OpenCV manually. Instead I relied on apt-get to install OpenCV.
The only place I can find are header files in /usr/include/opencv2
No link to OpenCV GitHub link please. It would be a pain later if it turns out that the code I am using on my PC is different from the one in GitHub.
I have looked at this post but I am not sure where OPENCV_HOME is.
If you do a pkg-config:
pkg-config --cflags opencv
You will find the include files, header files like you give above. I think you are referring to cpp files. Since you downloaded with apt-get you dont have cpp files on your disk. You are going to face the github reality in this case. Just get the same version source code from github. But I dont think of any usage of source code besides compiling. If you want to search the source of a function just use the github web interface, it is easier and a lot helpful

Access iOS filesystem without jailbreak?

I would like to write/use an open source script that can access iOS filesystem (non-jailbroken). On a Jailbroken device, i use ssh/scp to access, transfer data from the device. Intent is to copy some part of the iOS filesystem (say /var/mobile/Applications/xxx-xxxx/Documents) to a Mac, from a non-Jailbroken device, using some script. I see that tools like iFunBox is able to do it. Would like to know it manages to do so.
I came across mobiledevice.h but could not really understand how to use it.
Also, would prefer getting this done over USB.. for a jailbroken device, i use tcprelay.py for doing the usb tunneling. Is there something i can use for a non jailbroken device?
You can install the ifuse tool, which is hosted here: https://github.com/libimobiledevice/ifuse
In order to compile this tool, you will need the a working set of Gnu-tools (make, libtool, etc).
#Don't worry - clang is still default
sudo port install gcc48
NB: Update your .bash_profile (or similar) to include the following:
#Important - this is where your compiled libs will get installed to, so we need this
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/**
The rest of this process should take a few minutes
Install fuse4x
sudo port install fuse4x
Build the dependencies:
Check out: https://github.com/libimobiledevice/libplist, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
Check out: https://github.com/libimobiledevice/libusbmuxd, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
Check out: https://github.com/libimobiledevice/libimobiledevice, cd into the checkout, and run:
./autogen.sh
./configure
make
sudo make install
(If you're on Linux you'll also need to install usbmuxd, after building libusbmuxd and libimobiledevice. . otherwise, for Windows and OSX . . . )
Now build iFuse:
Check out: https://github.com/libimobiledevice/ifuse
./autogen.sh
./configure
make
sudo make install
To use ifuse to access your app's documents directory:
Make a mount directory:
sudo mkdir -p /Volumes/myapp.app
Now mount the app's dir:
ifuse --container <appid> /Volumes/abced.app
Where app id is the name what's displayed in the bundle identifier . . example:
ifuse --container mycompany.ABCED.com /Volumes/abced.app/
(Refer to the attached pic)
The MobileDeviceManager library brings us simple filesystem operations (it's an easy-to-use Objective-C wrapper around the MobileDevice framework you have come across).
The thing is that it doesn't support copying files from the device to the computer, only the other way around. So, in order to work around this issue, I've created a patch (GitHub gist) that you can merge into the included sample program to have it understand the copyFrom command.

How to compile CUDA SDK Sample?

I failed to compile conjugate gradient solver. I downloaded the whole archieve that contains libraries, makefile and other stuff but the compiler lacks some header files. How to include all files I downloaded? Maybe I need to add some path or copy folder "common" to /usr/local/cuda/include/
To download and build a cuda sample directly, the following steps worked for me:
wget http://developer.download.nvidia.com/compute/DevZone/CUDALibraries/Projects/x64/conjugateGradient.tar.gz
tar -xzvf conjugateGradient.tar.gz
cd 7_CUDALibraries/conjugateGradient
make
# to execute the program:
./conjugateGradient
This assumes a standard cuda 5 install is available at /usr/local/cuda.
It does not assume that any samples are previously installed.
I tested this on a machine with CUDA 5 and RHEL 5.5
If this does not work, please post details of the error output you received.
If you want to use some other sample than the example given here, the download links can be obtained here.

OpenCV compliation on linux: how to feed to it specific zlib lib?

I want to compile OpenCV with same zlib as I use for compilation of Boost Iostreams (not system default one). I want to compile OpenCV as static lib, having zlib compiled as static lib. Currently I use something like :
../$CMAKE_PATH -DCMAKE_INSTALL_PREFIX=./$OPENCV_INSTALL_SUBDIR -DBUILD_WITH_STATIC_CRT=ON -DBUILD_SHARED_LIBS=OFF -DBUILD_PYTHON_SUPPORT=OFF -DOPENCV_EXTRA_C_FLAGS=-fPIC -DOPENCV_BUILD_3RDPARTY_LIBS=TRUE
make
make install
echo Done!
I wonder: having some $ZLIB_HEADERS and $ZLIB_LIB_FILES_FOLDER path strings how to feed them into cmake to get OpenCV compiled with built by me zlib?
Please try cmake-gui or ccmake. Make sure to toggle advanced mode On (press t in ccmake).
You will find ZLIB_LIBRARY and ZLIB_INCLUDE_DIR.

Resources