From: Daniel Berger [mailto:djberg96 / gmail.com] 
# require 'ptools'
# File.image?(file)

i like the image routines, but could it be made extendible? maybe a template where we can add file info/properties easily like..

>cat /temp/image_template

bmp          BM6 
jpg,jpeg     \377\330\377\340\000\020JFIF
png          \211PNG
gif          GIF89a
gif          GIF97a
....

i've updated my ptools to 1.5 and am looking at ptools.rb. but i have concern, are you sure you like to add those extra methods like .jpg? .png?, etc?
i find too many methods already in ruby. You have already image?, would it be ok  if image? return the image type like "jpg" eg, and nil if it's not? like,

File.image?("test.jpg") => "jpg"

also, image? should not be extension dependent since i rename some files here =)

File.image?("test.jpg.renamed") => "jpg"

File.image?("justadatafile.data") => nil

kind regards -botp