Cybook thumbnail (format plug-in)

Plug-ins, add-ons, skins, icons, templates and other downloads. Contributions are welcome.

Moderators: XnTriq, helmut, xnview

IorPerry
Posts: 6
Joined: Thu Apr 16, 2009 10:46 pm

Cybook thumbnail (format plug-in)

Post by IorPerry »

Hi all,
I am creating the format plug-in for T2B files, they are the thumbnail for the Cybook eBook Reader.

My problem is that this format is very restrictive! the image must be 96x144x4 grays.

The first question is: When i return false in gfpSavePictureIsSupported i show a message box with the error, but later XnView show another message box! with message "contact you dealer", is there a way to don't show it?

Another question, it is possible restrict the support format to 4 grays? it call me with 8 bits per pixel with anything grayscale image...

The plug-in and the source code are in:
http://amicoperry.altervista.org/data/XnCybook.zip

Thank for any answer...
Perry
Last edited by IorPerry on Fri Apr 17, 2009 12:55 pm, edited 1 time in total.
User avatar
xnview
Author of XnView
Posts: 44583
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Cybook thumbnal (format plu-in)

Post by xnview »

IorPerry wrote: The first question is: When i return false in gfpSavePictureIsSupported i show a message box with the error, but later XnView show another message box! with message "contact you dealer", is there a way to don't show it?
gfpGetPluginInfo must have only *support = GFP_READ;
Another question, it is possible restrict the support format to 4 grays? it call me with 8 bits per pixel with anything grayscale image...
Currently not possible on plugin
Pierre.
IorPerry
Posts: 6
Joined: Thu Apr 16, 2009 10:46 pm

Re: Cybook thumbnal (format plu-in)

Post by IorPerry »

xnview wrote:
IorPerry wrote: The first question is: When i return false in gfpSavePictureIsSupported i show a message box with the error, but later XnView show another message box! with message "contact you dealer", is there a way to don't show it?
gfpGetPluginInfo must have only *support = GFP_READ;
I think that I was not clear enough, the plug-in saves the image if the size is 96x144, if the image is not of this size, the plugin show a message box with "The image must be 96x144" message. but later XnView shows a message box with "contact dealer"... I think 2 message box are a bit too much.
User avatar
xnview
Author of XnView
Posts: 44583
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Cybook thumbnal (format plu-in)

Post by xnview »

IorPerry wrote: I think that I was not clear enough, the plug-in saves the image if the size is 96x144, if the image is not of this size, the plugin show a message box with "The image must be 96x144" message. but later XnView shows a message box with "contact dealer"... I think 2 message box are a bit too much.
Oh ok, so perhaps don't return an error?
Pierre.
IorPerry
Posts: 6
Joined: Thu Apr 16, 2009 10:46 pm

Re: Cybook thumbnal (format plug-in)

Post by IorPerry »

maybe i don't understand correctly the interface :?

When XnView trying to save an image in the format of plug-in call sequentially:
* gfpSavePictureIsSupported to know if the the actual image can be saved in this format,
* gfpSavePictureInit with some information to initialize the save data
* gfpSavePicturePutLine for every line to save or storage the image (i think it uses this method to manage progress bar)
* gfpSavePictureExit to deinitialize the save

if i return false in gfpSavePictureIsSupported, what does XnView?
It shows a generic dialog box, but i want show "why" this format is not ok. How can i it?
Actually i show a my dialog box, but

I think that if gfpSavePictureIsSupported must return true, it is useless..

I see if the color is not supported XnView shows a dialog box to convert it, it is callable from format plugin?
User avatar
xnview
Author of XnView
Posts: 44583
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Cybook thumbnal (format plug-in)

Post by xnview »

IorPerry wrote: if i return false in gfpSavePictureIsSupported, what does XnView?
Ok, right. I you return false, xnview show a dialog box because there is an error between picture and format... A better way will be that the plugin return a text error...
I see if the color is not supported XnView shows a dialog box to convert it, it is callable from format plugin?
No, ok i need to change a little the plugin code...
Pierre.
IorPerry
Posts: 6
Joined: Thu Apr 16, 2009 10:46 pm

Re: Cybook thumbnail (format plug-in)

Post by IorPerry »

I am really happy that you understand my reasons :)
Developing a perfect format sdk support is really difficult and the t2b format is really bastard.

The actual format sdk is well designed, for a start point.

I think i will try to port Luce for XnView if the Plugin/Effect sdk is well as the format sdk is.:D

I could say that i would be happy to help you to work on xnview, but i don't think you are looking for help.

Perry
User avatar
xnview
Author of XnView
Posts: 44583
Joined: Mon Oct 13, 2003 7:31 am
Location: France

Re: Cybook thumbnail (format plug-in)

Post by xnview »

IorPerry wrote: I think i will try to port Luce for XnView if the Plugin/Effect sdk is well as the format sdk is.:D
The SDK for effect is easy, and more flexible...
Pierre.