-
-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named vipsCC #35
Comments
Hi, it could be caused by lots of things. On linux, check the setting of your PYTHONPATH variable and make sure that your vipsCC area is on there. |
Zhongming Wu E-mail: zhongmingmao@163.com At 2012-11-05 23:46:50,"John Cupitt" notifications@github.com wrote: Hi, it could be caused by lots of things. On linux, check the setting of your PYTHONPATH variable and make sure that your vipsCC area is on there. ¡ª |
Hi again, In Ruby you could do this: #!/usr/bin/ruby
require 'rubygems'
require 'vips'
include VIPS
# load the source image
# the :sequential arg means that we will only be accessing this image
# top-to-bottom -- this lets the reader avoid loading the entire image
im = Image.new(ARGV[0], :sequential => true)
# cut out 1000 x 1000 pixels at position 200 x 400
tile = im.extract_area(200, 400, 1000, 1000)
# scale up by a factor of 8 using a bicubic interpolator
big = tile.affinei_resize(:bicubic, 8)
# and save
big.write(ARGV[1]) On my (very old, very slow) desktop PC this runs like this: $ time ./try83.rb ~/pics/5k.png x.png
real 0m21.433s
user 0m26.362s
sys 0m0.300s Most of that time is spent in PNG load and save. PNG is a very, very slow file format. If I use tiff instead I see: $ time ./try83.rb ~/pics/5k.tif x.tif
real 0m4.032s
user 0m6.056s
sys 0m0.588s Which is more reasonable. This program runs in about 100mb of memory here. If I try ImageMagick I see: $ time convert ~/pics/5k.png[1000x1000+200+400] -interpolate bicubic -resize 800% x.png
real 0m36.742s
user 0m37.738s
sys 0m0.864s So vips is faster than IM at least. The IM program needs about 500mb of memory. |
Closing this question, reopen if you need more. |
How to slove this problems?Thx
The text was updated successfully, but these errors were encountered: