Skip to content

A lot of missing bytes when trying to write a bitmap to memory #13

@mtthwgry

Description

@mtthwgry
memory = FreeImage::Memory.new
image = FreeImage::Bitmap.open(...)
memory.save(image, :jpeg)

memory.memory.bytes
# => "\xFF\xD8\xFF\xE0"

memory.memory.count
# => 1017134

memory.memory.size
# => 9223372036854775807

This returns a memory object that contains 4 bytes, but has what appears to be the correct bytes count.

If I try image.save(memory, :jpeg) I get the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions