Changes

Jump to: navigation, search

Savy Cat

611 bytes added, 18:35, 27 March 2018
Rotate90
}</nowiki>
==== Profiling Using gprof Building On Matrix ====In order to get performance information using gprof, copy the CImg folder containing all source files to matrix. CImg is built to be cross-platform and should work as is. Some background information on what makes that is possible [http://cimg.eu/reference/group__cimg__overview.html can be found here]. [http://cimg.eu/reference/group__cimg__environment.html Environment variables] are automatically set based on OS, routing the program to appropriate paths of logic. Update Rotate.h to use a the relative path: #include "CImg-2.2.1/CImg.h Update Rotate.cpp to use relative paths to the .jpg files using Unix forward slash:   <nowiki>cimg_library::CImg<PX_TYPE> img_tiny("./Tiny-Shay.jpg");cimg_library::CImg<PX_TYPE> img_med(". /Medium-Shay.jpg");cimg_library::CImg is built to be cross<PX_TYPE> img_large("./Large-platform and should work as isShay. jpg");</nowiki>
To get the libjpeg library file (libjpeg.a), download the Unix formatted package jpegsrc.v9c.tar.gz [http://www.ijg.org/ from their homepage] and copy this to matrix. To extract the contents, issue the command:
This compiles files within the source folder.
Finally, run the following, which will put libjpeg.a into a 'lib' folder within the folder we created: jpeg-build/lib/.
make install
<nowiki>
# Makefile for CImg-RotateRotate90
#
GCC_VERSION = 7.2.0
Rotate: Rotate.o
$(CPP) -pg -oRotate90 Rotate.o -L/usr/X11R6/lib -lm -lpthread -lX11 -l:./jpeg-build/lib/libjpeg.a
Rotate.o: Rotate.cpp
93
edits

Navigation menu