post-it wrote:it was found that TGA's could retain their structures up to 14 edits before Degradation could be measured
- Code: Select all
#!/usr/bin/env ruby
require 'rubygems'
require 'RMagick'
include Magick
# throw in whatever 64x64 image you want
Original = 'test.tga'
New = 'test_new.tga'
times = 0
while true
orig = Image.read(Original)[0]
new = orig
new.flip!
new.flip!
new.write New
t1 = Image.read(Original)[0].get_pixels 0, 0, 64, 64
t2 = Image.read(New)[0].get_pixels 0, 0, 64, 64
raise "Data not equal" if t1 != t2
puts "checked #{times}"
times += 1
end
Let me know if that ever stops...
