Page 1 of 1

Cybook thumbnail (format plug-in)

Posted: Fri Apr 17, 2009 5:44 am
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

Re: Cybook thumbnal (format plu-in)

Posted: Fri Apr 17, 2009 6:31 am
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

Re: Cybook thumbnal (format plu-in)

Posted: Fri Apr 17, 2009 7:25 am
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.

Re: Cybook thumbnal (format plu-in)

Posted: Fri Apr 17, 2009 1:11 pm
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?

Re: Cybook thumbnal (format plug-in)

Posted: Fri Apr 17, 2009 3:48 pm
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?

Re: Cybook thumbnal (format plug-in)

Posted: Mon Apr 20, 2009 12:08 pm
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...

Re: Cybook thumbnail (format plug-in)

Posted: Tue Apr 21, 2009 6:10 am
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

Re: Cybook thumbnail (format plug-in)

Posted: Tue Apr 21, 2009 8:10 am
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...