Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Avoid trying to load images from FS root. #174

Merged
merged 1 commit into from

2 participants

@matschaffer

Without this change I get errors like:

Magick::ImageMagickError - unable to open file `/controllers/mvc.png' @ error/png.c/ReadPNGImage/3628:
/Users/mat/code/showoff/lib/showoff.rb:278:in `ping'
/Users/mat/code/showoff/lib/showoff.rb:278:in `get_image_size'
@goncalossilva goncalossilva merged commit 52d064a into from
@goncalossilva
Collaborator

Looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 9, 2012
  1. @matschaffer
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/showoff.rb
View
2  lib/showoff.rb
@@ -275,7 +275,7 @@ def update_image_paths(path, slide, static=false, pdf=false)
if defined?(Magick)
def get_image_size(path)
if !cached_image_size.key?(path)
- img = Magick::Image.ping(File.join(@asset_path, path)).first
+ img = Magick::Image.ping(File.join(".", @asset_path, path)).first
# don't set a size for svgs so they can expand to fit their container
if img.mime_type == 'image/svg+xml'
cached_image_size[path] = [nil, nil]
Something went wrong with that request. Please try again.