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
from PIL import Image | |
im = Image.open('sample.gif').convert('RGB').save('convertfromgif.jpg') |
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
<?php | |
$data = imagecreatefromgif('sample.gif'); | |
imagejpeg($data, 'convertgifimage.jpg'); |
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
$ brew install sqlite expat | |
==> Installing sqlite dependency: readline | |
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/readline-6.3.8.mavericks.bottle.tar.gz | |
######################################################################## 100.0% | |
==> Pouring readline-6.3.8.mavericks.bottle.tar.gz | |
==> Caveats | |
This formula is keg-only, which means it was not symlinked into /usr/local. | |
Mac OS X provides similar software, and installing this software in | |
parallel can cause all kinds of trouble. |
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
@@ -175,7 +175,7 @@ end | |
desc "Clean out caches: .pygments-cache, .gist-cache, .sass-cache" | |
task :clean do | |
- rm_rf [".pygments-cache/**", ".gist-cache/**", ".sass-cache/**", "source/stylesheets/screen.css"] | |
+ rm_rf [Dir.glob(".pygments-cache/**"), Dir.glob(".gist-cache/**"), Dir.glob(".sass-cache/**"), "source/stylesheets/screen.css"] | |
end | |
desc "Move sass to sass.old, install sass theme updates, replace sass/custom with sass.old/custom" |
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
By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree | |
You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf | |
clang: error: no input files |
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
<?php | |
$size = getimagesize('http://free-photos-ls01.gatag.net/images/lgf01a201304271400.jpg'); | |
var_export($size); | |
/* output | |
array ( | |
0 => 1024, | |
1 => 768, | |
2 => 2, | |
3 => 'width="1024" height="768"', |
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
[ 67%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_core.cpp.o | |
[ 67%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_warp_affine.cpp.o | |
[ 67%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_resize.cpp.o | |
[ 67%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_remap.cpp.o | |
[ 67%] Building CXX object modules/gpu/CMakeFiles/opencv_test_gpu.dir/test/test_hough.cpp.o | |
Linking CXX executable ../../bin/opencv_test_gpu | |
[ 67%] Built target opencv_test_gpu | |
[ 67%] Generating opencv_ocl_pch_dephelp.cxx | |
Scanning dependencies of target opencv_ocl_pch_dephelp | |
[ 67%] Building CXX object modules/ocl/CMakeFiles/opencv_ocl_pch_dephelp.dir/opencv_ocl_pch_dephelp.cxx.o |
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
import cv2 | |
# built-in module | |
import sys | |
if __name__ == '__main__': | |
print __doc__ | |
try: |
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
''' | |
usage: | |
python show_camera_or_video.py | |
or | |
python show_camera_or_video.py cam | |
or | |
python show_camera_or_video.py inputfilename.avi | |
''' | |
import numpy as np |
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
<?php | |
$url = "http://31.media.tumblr.com/tumblr_mc4u6lwZHr1qf4k86o1_500.jpg"; | |
$img_string = file_get_contents($url); | |
$img_data = imagecreatefromstring($img_string); | |
// make color | |
$gd = imagecreatetruecolor(1,1); | |
$red = imagecolorallocate($gd, 255, 0, 0); | |
// drawing |