V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  hfeeki  ›  全部回复第 4 页 / 共 13 页
回复总数  253
1  2  3  4  5  6  7  8  9  10 ... 13  
@ahu 你说的好像是每日流量消耗,不知道他们租用的线路的带宽是多大的?
2014-07-31 12:30:47 +08:00
回复了 hfeeki 创建的主题 程序员 谁知道现在有啥能够很好支持 ios, android 的开源视频播放器?
@sobigfish 你这不是在气我吗?明明google已经没法上了
2014-07-30 18:33:19 +08:00
回复了 hfeeki 创建的主题 程序员 谁知道现在有啥能够很好支持 ios, android 的开源视频播放器?
vitamio如果用于商业产品,还是要收费的
@pljhonglu
@WildCat
我们接受远程,我们正在招ios开发,最好能够用swift
这明显是吹牛B啊
2014-06-25 20:29:56 +08:00
回复了 hfeeki 创建的主题 程序员 wordpress3.8 如何禁用 google 字体?
@belin520 谷歌现在国内都没法上了,你还弄个谷歌的链接,你这样会让我更加抑郁的~^~
2014-06-25 19:41:34 +08:00
回复了 hfeeki 创建的主题 程序员 wordpress3.8 如何禁用 google 字体?
@XXOO 360的镜像在哪里?怎样替换成360的镜像?
2014-06-25 19:40:53 +08:00
回复了 hfeeki 创建的主题 程序员 wordpress3.8 如何禁用 google 字体?
@hisway 怎么替换?
谁知道怎样替换成本地字体?
2014-06-25 19:40:16 +08:00
回复了 hfeeki 创建的主题 程序员 wordpress3.8 如何禁用 google 字体?
@kingme 我上面说过,插件不起作用
2014-06-18 20:48:25 +08:00
回复了 hfeeki 创建的主题 macOS 苹果机器用什么工具录桌面操作视频好? 免费的优先
多谢各位,已经用了QuickTime录制了视频
import win32print
import win32ui
from PIL import Image, ImageWin

#
# Constants for GetDeviceCaps
#
#
# HORZRES / VERTRES = printable area
#
HORZRES = 8
VERTRES = 10
#
# LOGPIXELS = dots per inch
#
LOGPIXELSX = 88
LOGPIXELSY = 90
#
# PHYSICALWIDTH/HEIGHT = total area
#
PHYSICALWIDTH = 110
PHYSICALHEIGHT = 111
#
# PHYSICALOFFSETX/Y = left / top margin
#
PHYSICALOFFSETX = 112
PHYSICALOFFSETY = 113

printer_name = win32print.GetDefaultPrinter ()
file_name = "test.jpg"

#
# You can only write a Device-independent bitmap
# directly to a Windows device context; therefore
# we need (for ease) to use the Python Imaging
# Library to manipulate the image.
#
# Create a device context from a named printer
# and assess the printable size of the paper.
#
hDC = win32ui.CreateDC ()
hDC.CreatePrinterDC (printer_name)
printable_area = hDC.GetDeviceCaps (HORZRES), hDC.GetDeviceCaps (VERTRES)
printer_size = hDC.GetDeviceCaps (PHYSICALWIDTH), hDC.GetDeviceCaps (PHYSICALHEIGHT)
printer_margins = hDC.GetDeviceCaps (PHYSICALOFFSETX), hDC.GetDeviceCaps (PHYSICALOFFSETY)

#
# Open the image, rotate it if it's wider than
# it is high, and work out how much to multiply
# each pixel by to get it as big as possible on
# the page without distorting.
#
bmp = Image.open (file_name)
if bmp.size[0] > bmp.size[1]:
bmp = bmp.rotate (90)

ratios = [1.0 * printable_area[0] / bmp.size[0], 1.0 * printable_area[1] / bmp.size[1]]
scale = min (ratios)

#
# Start the print job, and draw the bitmap to
# the printer device at the scaled size.
#
hDC.StartDoc (file_name)
hDC.StartPage ()

dib = ImageWin.Dib (bmp)
scaled_width, scaled_height = [int (scale * i) for i in bmp.size]
x1 = int ((printer_size[0] - scaled_width) / 2)
y1 = int ((printer_size[1] - scaled_height) / 2)
x2 = x1 + scaled_width
y2 = y1 + scaled_height
dib.draw (hDC.GetHandleOutput (), (x1, y1, x2, y2))

hDC.EndPage ()
hDC.EndDoc ()
hDC.DeleteDC ()
貌似不是很负责、困难、麻烦。。。 我已经知道怎样做了
假设只提供一个图片文件的全路径名,怎样开发一个把图片打印出来的函数?
2014-05-13 18:31:56 +08:00
回复了 judezhan 创建的主题 酷工作 [长沙]芒果 TV 招各路工程师 Python Erlang Linux C PHP...
连薪酬水平都没有
1  2  3  4  5  6  7  8  9  10 ... 13  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2203 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 26ms · UTC 02:34 · PVG 10:34 · LAX 19:34 · JFK 22:34
Developed with CodeLauncher
♥ Do have faith in what you're doing.