Skip to content

Instantly share code, notes, and snippets.

@mieki256
mieki256 / bg.jpg
Last active January 16, 2018 06:29
PySide+QGraphicsViewでズーム表示する例。マウスホイールを回すか、ステータスバー上のボタンを押すと倍率が変わる。
bg.jpg
@mieki256
mieki256 / Save All Layers as Brushes.scm
Created October 6, 2016 12:17
ブラシ保存スクリプト(Save All Layers as Brushes)で保存されるブラシ名の連番部分をゼロでパディングするように修正。
; Save All Layers as Brushes rel 0.02.1
; Created by Graechan
; Comments directed to http://gimpchat.com or http://gimpscripts.com
;
; License: GPLv3
; This program is free software: you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, either version 3 of the License, or
; (at your option) any later version.
;
@mieki256
mieki256 / beep_mml.py
Last active July 30, 2016 22:49
MMLを周波数と時間のリストに変換するPythonスクリプト
#!/usr/bin/env python
# -*- mode: python; Encoding: utf-8; coding: utf-8 -*-
# Last updated: <2016/07/30 00:53:00 +0900>
"""
beep from MML
System requirements : Windows 10 x64 + Python 2.7.11
"""
import mmlparser
@mieki256
mieki256 / anglemove.rb
Last active March 14, 2016 10:44
イージングを利用して角度を滑らかに変化させられるかDXRubyを使って実験
#!ruby -Ku
# -*- mode: ruby; coding: utf-8 -*-
# Last updated: <2016/03/14 19:43:16 +0900>
#
# 角度を滑らかに変化させられるかテスト
require 'dxruby'
# quadratic ease in out
# @param t [Number] 時間(0.0 - 1.0)
@mieki256
mieki256 / easetest.rb
Last active March 14, 2016 10:45
DXRubyを使ってイージングのテスト
#!ruby -Ku
# -*- mode: ruby; coding: utf-8 -*-
# Last updated: <2016/03/14 19:45:20 +0900>
#
# イージングのテスト
require 'dxruby'
# quadratic ease in out
# @param t [Number] 時間(0.0 - 1.0)
@mieki256
mieki256 / bg_chip.png
Last active March 14, 2016 10:34
一本道を延々と走り続ける何か、のDXRubyスクリプト
bg_chip.png
@mieki256
mieki256 / image2gpl.py
Created December 30, 2015 11:48
インデックスカラー画像のパレット値をGIMP Palette(.gpl)に変換
#!/usr/bin/env python
# -*- mode: python; coding: utf-8 -*-
# Last updated: <2015/12/30 20:23:02 +0900>
"""
dump GIMP Palette (.gpl) format from index color image
by mieki256
License: CC0 / Public Domain
"""
import sys
@mieki256
mieki256 / scanlineseedfill2.rb
Created December 24, 2015 00:58
スキャンラインシードフィルの実験その2(アルゴリズム高速化版)
#!ruby -Ks
# -*- mode: ruby; coding: sjis -*-
# Last updated: <2015/12/24 09:51:49 +0900>
#
# 塗り潰しアルゴリズム(Scanline Seed Fill Algorithm)の実験
# 画像の中をクリックすれば塗りつぶしができる。
# アルゴリズムを高速化した版
#
# usage: ruby scanlineseedfill2.rb TEST.PNG
#
@mieki256
mieki256 / scanlineseedfill.rb
Created December 24, 2015 00:54
スキャンラインシードフィルによる塗り潰しの実験
#!ruby -Ks
# -*- mode: ruby; coding: sjis -*-
# Last updated: <2015/12/24 09:52:37 +0900>
#
# 塗り潰しアルゴリズム(Scanline Seed Fill Algorithm)の実験
# 画像の中をクリックすれば塗りつぶしができる。
# 画像の中をクリックすれば塗りつぶしできるはず。
#
# usage: ruby scanlineseedfill2.rb TEST.PNG
#
@mieki256
mieki256 / fakeantijaggies2.py
Created November 10, 2015 11:34
fakeantijaggies2.py - アンチジャギのテスト
#!/usr/bin/env python
# -*- mode: python; Encoding: utf-8; coding: utf-8 -*-
# Last updated: <2015/11/10 02:24:47 +0900>
"""
fakeantijaggies2
アンチジャギ、ジャギ消しの実験。
layman, lrevise.c を移植。
たぶん移植時に失敗して動作がバグってる予感。