Author Topic: BETA - Image Editor plugin  (Read 52863 times)

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #15 on: April 12, 2010, 11:00:32 pm »
I have updated the SVN.
I have corrected some bugs with resizing, and simplified the code.


Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Image Editor - new plugin
« Reply #16 on: April 13, 2010, 09:53:31 am »
I attach a patch that uses wxCustomButton from
Code: [Select]
wxSmithContribItems[/b] and works for me (linux) and a linux project-file, that can be used if the sources are below src/plugins/contrib.
The project-file has to be renamed to  be usable (remove the .txt-ending).

On windows the build options have to be fixed to find the custombutton lib and header.

[attachment deleted by admin]

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #17 on: April 13, 2010, 11:20:56 pm »
Hello,

thank you Jens for your patch.
My Internet was down today, so I did not see your patch.
I will try it tomorrow.

Anyway, I have followed your advice, and I have used the wxCustomButton: it works on Window. I have just updated the SVN - you may have a try.
I have copied the relevant code in the plugin - this way, I do not depend on wxSmithContribItems.

Have a nice evening.

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #18 on: April 13, 2010, 11:33:28 pm »
I have also updated the archive 7z on sourceforge
Question: imagine I consider that my SVN repository on sourceforge is a mess (a lot of useless files, like .obj or some unused bitmaps).
Is there an easy way to clean it ?
I have TortoiseSVN, on Windows Vista

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #19 on: April 14, 2010, 11:06:46 pm »
Hello,

I have commited some code on the SVN.
Last changes:
     1 - some bugs solved (on resizing, line drawing, ...)
     2 - start implementing Drag 'n' Drop for the selection (no finished and currently buggy. Try it at your own risk...)
     3 - cleaned a bit the code (broke down the big ProcessToolInAction method in several smaller one - it is more manageable)
     4 - IsCursorInSelection method added

What is missing (next)
     1 - finish Drag 'n' Drop
     2 - implement Stretch Selection
     3 - test 1 & 2
     4 - Implement the Text tool (should not be too difficult).

Let me know what you think.
Regards,

Sebastien

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #20 on: April 15, 2010, 11:00:10 pm »
Hello,

I have commited a revision on SVN (revision 12)

 changes:
    - dragging selection is working
    - copy / paste / cut is also working
    - small improvements in saving / loading (check format)
    - code cleaning (again)

 the 2 first changes make the plugin much more useable

 next topics I will work on:
    - save bitmap under the selection - so when re-dragging the selection, the old image will be restored
    - Text tool
    - resize / stretch selection

@Jens : I do not know if you have time - but if you have and if you want, you can test again the plugin.
            I have seen the patch you sent me 2 days ago, and I have already applied it (use wxCustomButton)*
            Thanks for the help !

Regards,

Sebastien

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5234
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Image Editor - new plugin
« Reply #21 on: April 16, 2010, 06:17:22 am »
Cool and Great!! :D
I love it!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #22 on: April 18, 2010, 11:27:48 pm »
Hello,

I have made an update on the plugin.
What is new:
  - text tool is done - needs debugging
  - dragging selection is working
  - arrows keys move selection, del / suppr / backspace delete it
  - stretching is implemented, needs testing & debugging [edit: does not work at all - need reviewing...]
  - several bug fixes

Nearly everything is done

See todo.txt for an accurate state of the plugin.

Sebastien
« Last Edit: April 18, 2010, 11:30:24 pm by seb_seb0 »

Offline danselmi

  • Developer
  • Almost regular
  • *****
  • Posts: 202
Re: Image Editor - new plugin
« Reply #23 on: April 19, 2010, 06:26:13 pm »

Is it possible that you missed to add/commit wxResizeCtrl.cpp/wxResizeCtrl.h?


Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Image Editor - new plugin
« Reply #24 on: April 19, 2010, 08:57:36 pm »

Is it possible that you missed to add/commit wxResizeCtrl.cpp/wxResizeCtrl.h?



Yes, it is possible !
I have corrected it now.

I have added a lot more things as well:
  - now stretching selection is working
  - add image / selection rotation
  - Text tool improved (alignement & orientation added)
  - conversion to grey scale or monochrome
  - stretch whole imaging
  - mirroring
  - bluring

Let me know if you have problems !

Sebastien

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9594
Re: Image Editor - new plugin
« Reply #25 on: April 30, 2010, 12:05:33 pm »
...I think in SVN quite some files are missing. I am at least unable to compile this plugin at all meanwhile... It used to work though.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Image Editor - new plugin
« Reply #26 on: April 30, 2010, 12:43:34 pm »
I had the same problem.
The cause was a non-empty .obj-directory,
.obj was (is) in svn and svn update stopped with an error after trying to update .obj.
All files that came after it (alphabetically I think) have not been updated.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9594
Re: Image Editor - new plugin
« Reply #27 on: April 30, 2010, 01:24:07 pm »
I had the same problem.
The cause was a non-empty .obj-directory,
I doubt that this is it. If I look at the project file I see references to missing files not in the SVN tree. If you open the project tree in C::B they are missing, too and obviously the linker won't find them.

Edit: I am talking about SVN trunk, Revision 26.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline jens

  • Administrator
  • Lives here!
  • *****
  • Posts: 7253
    • Jens' unofficial debian-repository for the Code::Blocks - IDE
Re: Image Editor - new plugin
« Reply #28 on: April 30, 2010, 02:12:07 pm »
I had the same problem.
The cause was a non-empty .obj-directory,
I doubt that this is it. If I look at the project file I see references to missing files not in the SVN tree. If you open the project tree in C::B they are missing, too and obviously the linker won't find them.

Edit: I am talking about SVN trunk, Revision 26.
You are right.
I just downloaded trunk on windows and ColourPickerPanel.* and QuickHelp.* are liosted in the project-file, but missing from svn.

But after removing them I have no problems compiling the plugin.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9594
Re: Image Editor - new plugin
« Reply #29 on: April 30, 2010, 02:40:20 pm »
But after removing them I have no problems compiling the plugin.
Stupid me :?. I should have tried that. I was thinking they were needed somehow... Works here now, too. :-)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ