244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
|
# File 'lib/bmffglitch/bmffex.rb', line 244
def to_s
sio = StringIO.new("", "r+")
sio.set_encoding("ascii-8bit")
sio.extend(BMFF::BinaryAccessor)
sio.write_uint16(@pre_defined1)
sio.write_uint16(@reserved2)
3.times do |i|
sio.write_uint32(@pre_defined2[i])
end
sio.write_uint16(@width)
sio.write_uint16(@height)
sio.write_uint32(@horizresolution)
sio.write_uint32(@vertresolution)
sio.write_uint32(@reserved3)
sio.write_uint16(@frame_count)
sio.write_uint8(@compressorname.length)
sio.write_ascii(@compressorname)
(31 - @compressorname.length).times do
sio.write_uint8(0)
end
sio.write_uint16(@depth)
sio.write_int16(@pre_defined3)
compose(sio.string + @children.map {|box| box.to_s}.join)
end
|