Revision: 9135
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at October 22, 2008 06:48 by PixelMin
Initial Code
<% my_file = File.open("image.jpg", "rb") {|f| f.read} img = ImageSize.new( my_file ) # Testing: get img width with image_size lib. img_witdh = img.get_width %>
Initial URL
Initial Description
If you get "JPEG marker not found!" error when you try to open an image file you must read it in binary mode.
Initial Title
Avoid "JPEG marker not found!" error
Initial Tags
file, error, ruby
Initial Language
Ruby