Add support for .lip files

Reported bugs that have been closed and/or resolved

Moderators: XnTriq, helmut, xnview, Dreamer

Post Reply
ZEUStiger
Posts: 17
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: 43441
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Add support for .lip files

Post by xnview »

could you send me some sample files?
Pierre.
ZEUStiger
Posts: 17
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.
Attachments
xrumzu.zip
(214.37 KiB) Downloaded 31 times
User avatar
xnview
Author of XnView
Posts: 43441
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Add support for .lip files

Post by xnview »

See issue for current status and some details.
Pierre.
User avatar
xnview
Author of XnView
Posts: 43441
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Add support for .lip files

Post by xnview »

This problem is supposed to be fixed in XnView MP 0.99.4. Please check and confirm the bug fix here.
Pierre.
ZEUStiger
Posts: 17
Joined: Mon Aug 15, 2011 10:29 am

Re: Add support for .lip files

Post by ZEUStiger »

Can confirm that it works, thank you.
Post Reply