Instantly share code, notes, and snippets.
- Freelance Engineer
- Osaka, Japan
- https://kanryu.github.io
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
// Specification: | |
// https://www.w3.org/TR/PNG-Filters.html | |
#include"Halide.h" | |
usingnamespaceHalide; | |
Exprnone_unfilter(Expr raw) { | |
return raw; | |
} |
kanryu /Japanese.txt
CreatedNovember 26, 2018 02:24
Sample text based translation for QLanguageSelector This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
; Language file was generated at Sun, 25 Nov 2018 21:09:55 +0900 | |
; === COMMENTS === | |
; This is a language file for QuickViewer. Lines beginning with ; are comments. | |
; Each language should have one language file in UTF-8 character set. | |
; When you change the text of this file, the notation of the application will be changed. | |
; If you make a new translation or modify an existing one, | |
; please post to Issue(https://github.com/kanryu/quickviewer/issues) or send an email to <k.kanryu@gmail.com>. | |
; | |
; Note 1: Use \n (backslash+n) instead of new line for each text, if you need. | |
; Note 2: 'hint' is a hint comment for each 'text'. |
kanryu /build-verbose3.log
CreatedJanuary 28, 2018 23:05
QuickViewer install log (failed get extensions by linuxdeployqt) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
/home/kanryu/Qt5/5.9.1/gcc_64/bin/qmake -install qinstall -exe /home/kanryu/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_64bit-Release/bin/QuickViewer /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/bin/QuickViewer | |
strip /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/bin/QuickViewer | |
/home/kanryu/Qt5/5.9.1/gcc_64/bin/qmake -install qinstall -exe /home/kanryu/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_64bit-Release/lib/libfileloader.so.1 /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/lib/libfileloader.so.1 | |
strip /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/lib/libfileloader.so.1 | |
/home/kanryu/Qt5/5.9.1/gcc_64/bin/qmake -install qinstall -exe /home/kanryu/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_64bit-Release/lib/lib7z.so /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/l |
kanryu /install.log
CreatedJanuary 28, 2018 11:08
QuickViewer install log (failed get extensions by linuxdeployqt) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
kanryu@kanryu-VirtualBox:~/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_64bit-Release/QuickViewer$ make install | |
/home/kanryu/Qt5/5.9.1/gcc_64/bin/qmake -install qinstall -exe /home/kanryu/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_64bit-Release/bin/QuickViewer /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/bin/QuickViewer | |
strip /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/bin/QuickViewer | |
/home/kanryu/Qt5/5.9.1/gcc_64/bin/qmake -install qinstall -exe /home/kanryu/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_64bit-Release/lib/libfileloader.so.1 /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/lib/libfileloader.so.1 | |
strip /home/kanryu/work/qvproject/quickviewer/QuickViewer/../../QuickViewer-1.0.9-x64.AppDir/usr/lib/libfileloader.so.1 | |
/home/kanryu/Qt5/5.9.1/gcc_64/bin/qmake -install qinstall -exe /home/kanryu/work/qvproject/build-QVproject-Desktop_Qt_5_9_1_GCC_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Desktop file as first argument: "../../QuickViewer-1.0.9-x64.AppDir/QuickViewer.desktop" | |
desktopExecEntry: "QuickViewer" | |
desktopIconEntry: "quickviewer" | |
Found binary from desktop file: "/home/kanryu/work/qvproject/QuickViewer-1.0.9-x64.AppDir/usr/bin/QuickViewer" | |
FHS-like mode with PREFIX, fhsPrefix: "/home/kanryu/work/qvproject/QuickViewer-1.0.9-x64.AppDir/usr" | |
app-binary: "/home/kanryu/work/qvproject/QuickViewer-1.0.9-x64.AppDir/usr/bin/QuickViewer" | |
appDirPath: "/home/kanryu/work/qvproject/QuickViewer-1.0.9-x64.AppDir" | |
relativeBinPath: "usr/bin/QuickViewer" | |
Found icons from desktop file: ("/home/kanryu/work/qvproject/QuickViewer-1.0.9-x64.AppDir/quickviewer.png") | |
preExistingToplevelIcon: "/home/kanryu/work/qvproject/QuickViewer-1.0.9-x64.AppDir/quickviewer.png" |
kanryu /halfshrink_gen.cpp
CreatedJanuary 21, 2018 02:14
shrink a bitmap into half size with halide-lang This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#include"Halide.h" | |
namespace { | |
classHalfShrink :publicHalide::Generator<HalfShrink> { | |
public: | |
Input<Buffer<uint8_t>> input{"input",3 }; | |
Output<Buffer<uint8_t>> halfshrink{"output",3 }; | |
voidgenerate() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#include"Halide.h" | |
#ifndef BUILD_RGBA | |
namespace { | |
classLuminor :publicHalide::Generator<Luminor> { | |
public: | |
Input<Buffer<uint8_t>> input{"input",3 }; | |
Input<float> b_sigma{"brightness",0.0 }; |
kanryu /luminor_gen2.py
Last activeDecember 27, 2017 11:15
a sample for image processing with look-up-table(after memorized) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
defget_luminorImpl(input,b_sigma,c_sigma,g_sigma,with_alpha): | |
""" | |
input: a Buffer as an bitmap image on memory | |
b_sigma: float value for brightness(default: 0.0, range: -255 to 255) | |
c_sigma: float value for contrast(default: 1.0, range: 0.1 to 10.0) | |
g_sigma: float value for gamma value(default: 1.0, range: 0.1 to 10.0) | |
""" | |
asserttype(input)==ImageParam | |
assertinput.dimensions()==3 |
kanryu /luminor_gen.py
Last activeDecember 27, 2017 11:15
a sample for image processing with look-up-table(before memorized) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
defget_luminorImpl(input,b_sigma,c_sigma,g_sigma,with_alpha): | |
""" | |
input: a Buffer as an bitmap image on memory | |
b_sigma: float value for brightness(default: 0.0, range: -255 to 255) | |
c_sigma: float value for contrast(default: 1.0, range: 0.1 to 10.0) | |
g_sigma: float value for gamma value(default: 1.0, range: 0.1 to 10.0) | |
""" | |
asserttype(input)==ImageParam | |
assertinput.dimensions()==3 |
kanryu /convertCMYKtoRGB.cpp
Last activeSeptember 15, 2017 06:57
Convert from CMYK to sRGB with ICC Profile(for Windows) This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
#include<Windows.h> | |
#include<Icm.h> | |
BOOLconvertCMYKtoRGB(void *cmyk,void *rgb, DWORD w, DWORD h) | |
{ | |
HPROFILE hProfiles[2] = {0 }; | |
PROFILE p = {0 }; | |
std::wstring woppath =L"RSWOP.icm"; | |
p.dwType = PROFILE_FILENAME; |
NewerOlder