# File lib/RMagick.rb, line 1327
    def set_current(current)
        if length() == 0
            self.scene = nil
            return
        # Don't bother looking for current image
        elsif scene() == nil || scene() >= length()
            self.scene = length() - 1
            return
        elsif current != nil
            # Find last instance of "current" in the list.
            # If "current" isn't in the list, set current to last image.
            self.scene = length() - 1
            each_with_index do |f,i|
                if f.__id__ == current
                    self.scene = i
                end
            end
            return
        end
        self.scene = length() - 1
    end