TurtleGit for Mac

View Markdown source ↗

EMF+ indexed and 16-bit bitmap comparison

Pinned TortoiseGit: 7338078f8ddd924b8cddee35f512f2286072136d. TortoiseIDiff delegates image loading to GDI+. TurtleGit's native image comparison, dropped previews and conflict panes share the bundled metafile renderer. This extension closes a concrete decoder gap in that shared path; it introduces no additional window or Git operation.

Format contract

Microsoft's PixelFormat enumeration defines indexed 1/4/8-bit color, RGB555, RGB565 and ARGB1555 alongside the previously supported 24/32-bit formats. Indexed input uses a palette before its packed pixel array, as required by BitmapData. The bitmap header provides width, height, signed stride and format.

The same raw-bitmap parser serves image objects and texture brushes. A texture must account for the complete palette as well as scan lines; treating the whole body as stride-times-height pixels would either reject valid indexed textures or read palette words as image pixels. Packed indices retain their bit/nibble order, and each used index must address an existing entry. Padding bits and row padding are not pixels. Palette color and alpha feed the existing native RGBA conversion, independently of texture wrap and image attributes. Palette flags describe the supplied entries; they do not generate a replacement palette. Unknown flags and a grayscale declaration containing colored entries are refused.

RGB555 ignores its unused high bit. RGB565 keeps its sixth green bit. ARGB1555 uses its high bit as alpha. The native conversion expands the stored components for display, retaining row orientation and padding. Existing 24-bit BGR, 32-bit BGRX, ARGB and premultiplied ARGB remain supported.

The October 19 indexed/16-bit checkpoint required four-byte-aligned scan lines while retaining an earlier sufficient-stride policy for 24/32-bit inputs. The October 23 high-depth continuation enforces the wire stride alignment for all raw formats and corrects the old RGB24 fixtures without changing their expected colors. Dimensions, row extents, palette size and pixel storage are validated before allocation/iteration. Native bitmap expansion reserves a shared 64-million-pixel budget per conversion, including generated brush cells, before RGBA allocation. Truncated data, absent palettes, invalid indices or unsupported formats fail decoding instead of producing a plausible blank image. The existing helper input/output/deadline limits, process ownership and native source-byte preservation remain in force.

Evidence and limits

Batch evidence records the actual runtime build, focused Core and grouped native results, including failed attempts and affected rechecks. Synthetic records are original TurtleGit fixtures; they are not Windows GDI+ acceptance captures.

Negative dimensions, nested WMF images, complex text/pen behavior and the other documented graphics gaps remain unsupported. This extension does not certify every metafile, Windows pixel identity, physical image-window gestures, all-format signed helper execution, Finder grants or an App Store release. Original image/conflict bytes remain the comparison and save inputs; decoding only prepares the display representation.

The grouped checkpoint passed thirty distinct metafile Core methods, the universal runtime/source reconstruction, Debug app build and native consumers with system and bundled Git. Two new alpha methods initially assumed literal sRGB half-red components after native display compositing. Exact embedded PNG checks showed the source RGBA was correct; an independent plain CSS SVG produced the same displayed colors as the bitmap. The repaired fixtures retain exact source-alpha checks and compare uniform interiors to that native reference. Only those two methods were repeated; twenty-eight earlier passes and both native passes were retained. Failed attempts and the accidentally empty first focused filter are recorded in the linked evidence. Both owned receivers were reaped and their PIDs/process groups independently checked absent.

The later signed-parent checkpoint runs the actual packaged helper and native image loader inside an Apple Development AppStore sandbox. Indexed4 with signed rows and RGB565 texture/clamp cases pass alongside vector/text/gradient/region/hatch samples, malformed refusal and a real post-launch deadline. It retains exact source bytes, private-directory cleanup and owned-process drainage. Other indexed/16-bit combinations retain their prior Core/native evidence; they were not each repeated in the signed corpus.