Add support for .lip files

Bugs which are supposed to be fixed in the next test version (not available yet)

Moderators: XnTriq, xnview, Dreamer

ZEUStiger
Posts: 16
Joined: Mon Aug 15, 2011 10:29 am

Add support for .lip files

Post by ZEUStiger »

Since I'm on the topic of .clip files...

.lip is a file format produced by old versions of Manga Studio / Clip Studio, that predates the newer .clip format. Luckily, since XnView already supports .clip, adding support for .lip is incredibly trivial.

XnView opens .clip files by extracting the pre-generated thumbnail from the SQLite DB file embedded inside the .clip file, via something along the lines of "SELECT ImageData FROM CanvasPreview ORDER BY ImageWidth * ImageHeight DESC". To find the address of the embedded SQLite file, you, presumably, read the 64-bit value at location 0x30 in the file and add 0x10 to it.

The only difference between .clip and .lip is that with .lip - the entire file is the SQLite DB, therefore all that needs to be done to support it, is to copy the .clip implementation and remove the seek part, instead opening up the .lip file itself with SQLite in read-only mode and extracting the thumbnail with the exact same query.

Alas, I cannot provide any sample .lip file, because I only have large files remaining from those olden times, and the new versions of Clip Studio don't provide an option to save in that old format. I can only assure you that what I described will work, because that's what I myself am doing to read .lip files in my own C# project: https://pastebin.com/05u6kkUX

Much love for creating and supporting XnView through all these years. Cannot imagine getting by without it. :)
User avatar
xnview
Author of XnView
Posts: 36286
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Add support for .lip files

Post by xnview »

could you send me some sample files?
Pierre.
ZEUStiger
Posts: 16
Joined: Mon Aug 15, 2011 10:29 am

Re: Add support for .lip files

Post by ZEUStiger »

Went searching the internet for some example files, and found an old thread about this format on this very forum: viewtopic.php?t=28554

You asked for the file to be mailed to you, I don't know whether the person did that or not, so anyway, I'm sending you that very file both via email and as an attachment here.
You do not have the required permissions to view the files attached to this post.
User avatar
xnview
Author of XnView
Posts: 36286
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Add support for .lip files

Post by xnview »

See issue for current status and some details.
Pierre.