-
-
Notifications
You must be signed in to change notification settings - Fork 419
Labels
Thumbs/PreviewsFile thumbnails or previewsFile thumbnails or previewsType: EnhancementNew feature or requestNew feature or requestType: UI/UXUser interface and/or user experienceUser interface and/or user experience
Description
Checklist
- I am using an up-to-date version.
- I have read the documentation.
- I have searched existing issues.
Description
There are currently no thumbnail previews for mdp
files (the project file format for Medibang Paint and FireAlpaca).
Solution
Add a thumbnail renderer for mdp
files.
Alternatives
No, mdp
files currently have the default, blank thumbnail.
mdp
Format
While I don't know exactly what the schema is, I've noticed a few things at a glance:
- Begins with
mdipack
. - Contains an XML block describing basic information about the project file, including dimensions, timestamps, and layer data.
Example XML block:
<?xml version="1.0" encoding="UTF-8" ?>
<Mdiapp width="1368" height="2261" dpi="350" checkerBG="false" bgColorR="116" bgColorG="124" bgColorB="170">
<CreateTime time="1708562941" timeString="2024-02-21T19:49:01" />
<UpdateTime time="1717740744" timeString="2024-06-07T02:12:24" rev="458" />
<Thumb width="154" height="256" bin="thumb" />
<Snaps />
<Guides />
<ICCProfiles enabled="false" cmykView="false" blackPoint="true" renderingIntent="perceptual" />
<Animation enabled="false" showNextPrev="true" baseLayer="false" fps="24" />
<Layers active="9">
<Layer name="Sketch 1" width="1368" height="2261" mode="normal" alpha="28" id="2" parentId="15" binType="2" bin="layer0img" type="32bpp" />
<Layer name="Sketch 2" width="1368" height="2261" mode="normal" alpha="40" id="10" parentId="15" visible="false" binType="2" bin="layer1img" type="32bpp" />
<Layer name="Body" width="1368" height="2261" mode="normal" alpha="102" id="17" parentId="15" binType="2" bin="layer2img" type="32bpp" />
<Layer name="Left Arm" width="1368" height="2261" mode="normal" alpha="102" id="18" parentId="15" binType="2" bin="layer3img" type="32bpp" />
<Layer name="Right Arm" width="1368" height="2261" mode="normal" alpha="103" id="19" parentId="15" binType="2" bin="layer4img" type="32bpp" />
<Layer name="Hand" width="1368" height="2261" mode="normal" alpha="233" id="20" parentId="15" binType="2" bin="layer5img" type="32bpp" />
<Layer name="Head" width="1368" height="2261" mode="normal" alpha="102" id="16" parentId="15" binType="2" bin="layer6img" type="32bpp" />
<Layer name="Sketches" width="1368" height="2261" mode="normal" alpha="87" id="15" parentId="-1" visible="false" folderOpen="false" binType="2" bin="layer7img" type="folder" />
<Layer name="Colors" width="1368" height="2261" mode="normal" alpha="255" id="12" parentId="-1" binType="2" bin="layer8img" type="32bpp" />
<Layer name="Shading" width="1368" height="2261" mode="normal" alpha="255" id="13" parentId="-1" binType="2" bin="layer9img" type="32bpp" />
<Layer name="Lines" width="1368" height="2261" mode="normal" alpha="255" id="0" parentId="-1" binType="2" bin="layer10img" type="32bpp" />
<Layer name="Face" width="1368" height="2261" mode="normal" alpha="255" id="14" parentId="-1" binType="2" bin="layer11img" type="32bpp" />
</Layers>
</Mdiapp>
- Immediately following is a bunch of raw byte data, split into sections with text indicators corresponding with the
bin
fields of each of the XML keys.
The file appears to store a thumbnail for the project, so the best bet would likely be to extract it from the file to use as the preview thumbnail.
Metadata
Metadata
Assignees
Labels
Thumbs/PreviewsFile thumbnails or previewsFile thumbnails or previewsType: EnhancementNew feature or requestNew feature or requestType: UI/UXUser interface and/or user experienceUser interface and/or user experience