I work with Paint.net and the native file format there is: .pdn
I was wondering what I would have to do so that I can preview the image files in Opus Viewer. as, as of now, there is no plug-in for this format available in Opus, to my knowledge.
Thank you for any suggestions you can offer. And:
Happy New Year
You'd have to write a viewer plugin, or find or write a Preview Handler (would also work in File Explorer, Office, etc.), or pay/convince someone else to write one.
The Opus side of writing such a plugin is actually trivial for anyone with beginner C/C++ skills. The hard part, if there isn't a library out there which someone has already written for the image format, is writing the code to decipher the image format and turn it into bitmap data.
As far as I know, there isn't a library for this format, although there are one or two third party viewers. IrfanView can view the files, from a quick search, and can be used to convert a .PDN file to a .PNG file. So if the image format is not something anyone can work out on their own, and the code for viewing it is not available, then a plugin could be written which calls IrfanView behind the scenes, converts the image to .PNG format in the temp folder, and then opens & decodes the .PNG file to get the bitmap data. That would be slower than decoding the file directly, of course.
Using Win 10 File Explorer, I can see both a .pdn "thumbnail" in icon view and the actual image in the viewer. In January 2020, the Paint.net developer confirmed this is as expected do to a shell extension.
In DOpus, I can neither view .pdn thumbnails or see the image in the viewer.
Unless I'm missing something, if we can see it in File Explorer, we should see it in DOpus, correct?
The files that aren’t being displayed look like they’re all text characters, so the TextThumbs plugin handles their thumbnails and the Text viewer plugin displays them in the viewer.
The TextThumbs plugin lets you specify a list of extensions that it shouldn’t handle, which should solve that.
The Text viewer plugin doesn’t have a similar list, but try disabling it to see if things work, in case there’s something else wrong as well or instead.
Without the ability to exclude file types in the Text viewer plugin, it appears users will have to choose between viewing text files and pdn files, correct?
If that is the case, request the GPS team add adjusting the Text viewer plugin to allow file type exclusions to its development list.
Hey, any chance this could be extended for comic book files .cbz and .cbr I get the exact same issue with occasional files and same workaround fixes it.
I'm surprised if those get detected as text files. Could you point to some example files which cause problems, or send me a couple via private message?
I don't have any samples I can send but I can see the file its previewing instead of the front cover is the ComicInfo.xml file.
Out of curiosity I unzipped and re-zipped the file and it showed as expected, no more text preview, so must be something odd in the zip process sometiimes (tried a few different zip programs but couldn't replicate the text preview on any). So i've got a work around for the few odd files this happens to, still might be nice if the text viewer plugin had the same exclude option as the textthumb plugin
The text plugin is the last resort (other than non-Opus plugins), and Opus usually shows thumbnails for CBZ files via the Archives plugin.
So it probably wouldn't help, unless you're not using the Archives plugin. The issue is probably with how the archive is structured (e.g. images in subdirs with an xml by itself in the root would probably not work). But I can only guess without an example file.