Google

/*
 * Does this image have transparent or translucent regions?
 *
 * Examples:
 *   if image.has_alpha? 
 *     puts 'this image has alpha'
 *   end
 *
 */
static VALUE image_has_alpha(VALUE self) {