Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

BETA - Image Editor plugin

<< < (2/20) > >>

seb_seb0:
Thank you danselmi.
I have solved the crashing bug !

I have implemented some of the functionalities now - I will probably post a Beta this week-end.

Now Save & Save As are working, and they are saving in the correct format.
Drawing has been buffered, and flicker is removed.
I have also simplified the plugins itself (removed the xpm_imageeditorarray class). The simpler it is, the easier it will be to maintain.

I have preferred to focus on removing the bug and getting the code base clean and correct, instead of implementing too fast all the features. I do not want to give a buggy plugin...

What remains to do (in this order):
      - better integration with CodeBlocks (title of the tab in wxAUI does not show a "*" when modified) - still to be solved
         Danselmi: I have seen your suggestion, but I did not have the time to do it yet. This will be my next step
      - Selection + Copy & Cut (done, but needs testing...)
      - Pen tool (the simplest one)
      - implement all the tools (draw line, draw rectangle, ... the bulk of what is remaining)
      - interface with wxSmith (cryogen made a patch for that : the DialogBox for choosing an image should have a new option. see thread http://forums.codeblocks.org/index.php/topic,372.165.html )
      - testing on Linux

what I will do on version 2:
     - integrate a configuration panel: Undo buffer, Color Palette, how to handle XPM file by default (use the Text Editor or the Image Editor).

I have put the last version of the project on SourceForge:
https://sourceforge.net/projects/xpmeditor/

Let me know what you think.
Best regards,

Sebastien

seb_seb0:
Hello,

I have updated the plugin. It is still not finished, but now it is usable

What is new:
    1 - all bugs solved. No more crashing of CodeBlocks :-) (and the code was simplified. I have solved the problem by copying some parts of the HexEditor plugin).
    2 - Integration with CodeBlocks: all problems of file naming / modification flags solved
    3 - Undo / Redo improved
    4 - Work around a nasty bug in wxWidgets(wxDC.SetUserScale is not accurate - on big zoom factor, I had a 4 pixels error for 400 x 200 bitmaps...). This is what took me the most of my time
    5 - Cut / Copy / Paste implemented & tested
    6 - Save / SaveAs / Load implemented & tested
        All formats supported by wxWidgets are supported by the plugin (most notable: bmp, xpm, png)
    7 - following tools are implemented:
            Rectangle selection
            Polygon selection
            Pen
            Pipette
            Fill
     8 - ColourPicker improved: Left click select the Line colour, right click select the fill colour. A small toggle button can invert this behaviour.

What remain to do:
    1 - implement the rest of the tools
            brush (working on it)
            line
            curve
            eraser
            rectangle
            rounded rectangle
            ellipse
            polygon

    2 - resize selection / stretch selection / drag selection

    3 - add a configuration panel:
            How to handle XPMs (open it as text, as image, or ask the user each time)
            Undo / Redo buffer size
            Color palette (how many colors, and which one).

        All these options are already implemented in the code,and accessible in the main plugin interface
        What remains to do is to create the panel, and add it in the CodeBlocks option (and save the options).

nice to have, but not necessary for 1st release

    4 - add a jpg quality option

    5 - add a color depth option

    6 - add a file filter in the global CodeBlocks file open / save dialog box (it is already crowed with many file types, so I am not sure if it is a good idea)

    7 - testing on Linux & Mac
    
    8 - interface with wxSmith (cryogen made a patch for that : the DialogBox for choosing an image should have a new option. see thread http://forums.codeblocks.org/index.php/topic,372.165.html  )
   
    9 - Transparency : sometimes the transparency mask disappears when using some customed colours

I have updated the code on sourceforge:
https://sourceforge.net/projects/xpmeditor/

Let me know what you think.
And do not hesitate to report me any bugs !

Sebastien

danselmi:
Hi Sebastien

You made great progress!

A few thoughts:

* AFAIK it is not foreseen to add a file filter in the global CodeBlocks file open / save dialog box. The only way I found is to generate a lexer-configuration file (even if there does not exist a scintilla-lexer for bitmaps ).
* Why do you not commit the code to the svn repo on sorceforge? It is also helpful for you.
* Most other plugins use CamelCase namings (class and filenames) but this is only a matter of personal taste.
regards,
danselmi

MortenMacFly:

--- Quote from: seb_seb0 on April 10, 2010, 08:50:42 pm ---I have updated the code on sourceforge:
https://sourceforge.net/projects/xpmeditor/

--- End quote ---
It took me a while to find out you are not using SVN on sourceforge... (why?!). Now I can give tit a try, too... :)

seb_seb0:
Hello,

I have updated the .7Z archive on Sourceforge. (I have not done it in SVN because I do not know how to do it yet. I will find how, but it takes time, and I prefer to use this time for developping the plugin).
https://sourceforge.net/projects/xpmeditor/

EDIT: now the plugin is also available as a SVN repository on sourceforge.

What changed:
  - change the name of all the classes and of the plugin to CamelCase (I have followed the suggestion from DanSelmi)
  - nearly all the tools are implemented !! (only the Text tool is not done)

What remains to do:
  - points 2 to 9 from my previous list.

Optimisations possible:
  - Undo / Redo buffers should be smarter (maybe store only a sub-bitmap and its position...)
  - wxMouseEvent tends so skip some coordinates. I do not know yet if it is my plugin who is slow, or if it comes from wxWidgets.

Once it is done, I will need to test thoroughly before final release.
I will need testers for Linux & Mac

1 side note: the tool is not at all optimized (or you may say otherwise: it is optimized for small bitmaps).
In theory, you can edit a 2000 x 2000 bitmap. In practice, it can be challenging for the CPU. (especially UNDO / REDO buffer which stores the whole bitmap each time).

But as I said, the goal I had in my mind was Toolbars / Menu icons fast edition. They are very often smaller than 2000 x 2000.

Let me know what you think !

Sebastien

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version