Read (or guess) size of raw RGBA/RGB files
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 14.4k
- Forks
- 752
- Avg merge
- 10d 14h
- Merged PRs (30d)
- 1
Description
Windows OS version
Windows 11 25H2
ImageGlass version
9.4.1.15
ImageGlass release
Classic
1️⃣ Describe the feature
example file name: 512x512.rgba
This should then be parsed to ImageMagick as an RGBA image with dimensions 512 x 512, little endian & bit depth 8.
example file name 2: chr_e_db41a_body_256x512.rgba4444be
This should be parsed as RGBA 256 x 512 big endian with bit depth 4.
But if a file doesn't have the size in the file name, try guessing it based off of file size & format:
example file: 1mb, RGBA
So to calculate the dimensions:
root(size*8/BitsPerPixel)
root(1048576*8/32 = 262144) = 512
Aliases for formats should also be supported, so:
RGBA == RGBA8 == RGBA8888
RGB == RGB8 == RGB888
As ImageMagick also needs the depth, that can also just be derived from the extension with 8 bits per color being the default (so the aliases above are correct).
2️⃣ How to use feature
Open an .rgba/.rgba8/.rgba8888/.rgb565/.rgb/.rgb8/.rgb888/.rgba4/... file
I would also personally say that extensions with endianess also have to specify the bit depth so .rgb8be and .rgba8888le would be allowed but not .rgble
3️⃣ Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start by locating ImageGlass's raw-image opening path and its ImageMagick integration; done means parsing the proposed filename aliases, dimensions, endianness, and bit depth, with file-size guessing when dimensions are absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100