I am Charmie

メモとログ

2014-03-05から1日間の記事一覧

TeXMaths: LIbreOffice's extension

TeXMaths is an LibreOffice's extension that enables to make equations with LaTeX on LibreOffice. The installation is very simple: Download .oxt file from download pageRun LibreOffice -> Tools -> Extension manager -> Add -> Specify the down…

CImg: display image(s)

This code loads an image lena.bmp and shows the original image and its grayscaled one in a window, which shows text "Original image | Grayscale image" on its bar. [code lang="c"] std::string strFile = "lena.bmp"; cimg_library::CImg<unsigned char> img1(st</unsigned>…

CImg: convert an RGB image to a grayscale image

This code loads a image lena.bmp and converts the image to grayscale one. [code lang="c"] std::string strFile = "lena.bmp"; cimg_library::CImg<unsigned char> img1(strFile.c_str()); cimg_library::CImg<unsigned char> img2; int color = _imgInput.spectrum(); // to check th</unsigned></unsigned>…

CImg: open an image file

CImg provides several constructors for cimg_library::CImg type objects. [code lang="c"] std::string strFile = "lena.bmp"; cimg_library::CImg&lt;unsigned char&gt; img1(strFile.c_str()); cimg_library::CImg&lt;unsigned char&gt; img2; img2 = c…

CImg: CMakeLists.txt

CImg is provides as a single header file, however it requires several libraries to use CImg in C++ code. CMakeLists.txt and Makefile in ./CImg-1.5.8_rolling140227/examples tells us which libraries should be set.

Ubuntu: change default applications

Default applications for each file type are set in a text file /usr/share/applications/defaults.list . In the file, an application is assigned to each file type as a default application as text/plain=gedit.desktop The above line means that…