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
Cybook thumbnail (format plug-in)
Moderators: XnTriq, helmut, xnview
-
- Posts: 6
- Joined: Thu Apr 16, 2009 10:46 pm
Cybook thumbnail (format plug-in)
Last edited by IorPerry on Fri Apr 17, 2009 12:55 pm, edited 1 time in total.
-
- Author of XnView
- Posts: 44583
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Cybook thumbnal (format plu-in)
gfpGetPluginInfo must have only *support = GFP_READ;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?
Currently not possible on pluginAnother question, it is possible restrict the support format to 4 grays? it call me with 8 bits per pixel with anything grayscale image...
Pierre.
-
- Posts: 6
- Joined: Thu Apr 16, 2009 10:46 pm
Re: Cybook thumbnal (format plu-in)
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.xnview wrote:gfpGetPluginInfo must have only *support = GFP_READ;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?
-
- Author of XnView
- Posts: 44583
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Cybook thumbnal (format plu-in)
Oh ok, so perhaps don't return an error?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.
Pierre.
-
- Posts: 6
- Joined: Thu Apr 16, 2009 10:46 pm
Re: Cybook thumbnal (format plug-in)
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?
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?
-
- Author of XnView
- Posts: 44583
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Cybook thumbnal (format plug-in)
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...IorPerry wrote: if i return false in gfpSavePictureIsSupported, what does XnView?
No, ok i need to change a little the plugin code...I see if the color is not supported XnView shows a dialog box to convert it, it is callable from format plugin?
Pierre.
-
- Posts: 6
- Joined: Thu Apr 16, 2009 10:46 pm
Re: Cybook thumbnail (format plug-in)
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.
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
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.
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
-
- Author of XnView
- Posts: 44583
- Joined: Mon Oct 13, 2003 7:31 am
- Location: France
Re: Cybook thumbnail (format plug-in)
The SDK for effect is easy, and more flexible...IorPerry wrote: I think i will try to port Luce for XnView if the Plugin/Effect sdk is well as the format sdk is.
Pierre.