View http_server.py
#! /usr/local/bin/python3
# https://docs.python.jp/3/library/http.server.html
# https://blog.sarabande.jp/post/81479479934
from http.server import HTTPServer, SimpleHTTPRequestHandler
[host, port] = ["0.0.0.0", 4848]
class MyHandler(SimpleHTTPRequestHandler):
def do_GET(self):
View grayscale.py
# (c) yoya@awm.jp 2018/07/05-
# ref) https://www.programcreek.com/python/example/89944/PIL.Image.frombytes
# http://pillow.readthedocs.io/en/5.2.x/reference/Image.html#PIL.Image.Image.convert
from PIL import Image
import sys
def gamma_correct(im, gamma):
if gamma == 1.0:
return im
View pentile_rgbw2.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View pentile_rgb.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View pentile_rgb_w.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View pentile_rgbw.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View pentile_rgb.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View pentile_rybg.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View slot_mask.php
<?php
/*
* (c) 2017/08/21- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;
use SVG\Nodes\Structures\SVGDefs;
View shadow_mask.php
<?php
/*
* (c) 2017/08/20- yoya@awm.jp
* $ composer require yoya/php-svg
*/
require_once("vendor/autoload.php");
use SVG\SVGImage;
use SVG\Nodes\Structures\SVGStyle;