Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (499)
Games in Android Showcase (118)
games submitted by our members
Games in WIP (568)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 4
  ignore  |  Print  
  Paint.JAVA - Attempt at cloning Paint.NET (with cross-platform support)  (Read 10463 times)
0 Members and 1 Guest are viewing this topic.
Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Posted 2013-09-27 22:38:50 »

Latest Download: Here!
Github: Here!
Somewhat useful wiki: Here! (Just kidding. It's not useful at all in its current state)

Some here may remember my occasional grumbling at the lack of a suitable Paint.NET equivalent for Linux.

Turns out that if I want something done right, I have to do it myself.

My priority is pixel art, so my idea of a Paint.NET clone may be different than yours if you're a photo editor etc.

Here's an automatically-updated screenshot:


Feedback would be appreciated to help this grow into a useful tool.

Offline Slyth2727
« Reply #1 - Posted 2013-09-27 23:49:08 »

Very cool Smiley May I suggest that you add those little rulers on the sides to indicate how far you are zoomed in? When you use ctrl+scroll it is hard to see if you have nothing on the screen. Just a suggestion.
Also, how did you export as a png? Does java do that for you or did you have to write an exporter?

Was I before Chuang Tzu who dreamt about being a butterfly, or am I now a butterfly who dreams about being Chuang Tzu?
Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #2 - Posted 2013-09-27 23:56:21 »

Also, how did you export as a png? Does java do that for you or did you have to write an exporter?

1  
ImageIO.write(image, "PNG", file);

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline farrell2k

Junior Newbie


Medals: 1



« Reply #3 - Posted 2013-09-28 08:57:12 »

Pretty cool.  If I may make a suggestion.  Call setLocationRelativeTo(null)  after you make your windows visible, so they center on the screen.  It makes it so much easier that dealing with frames at the top left corner of the screen.
Offline wessles

JGO Wizard


Medals: 66
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #4 - Posted 2013-09-28 14:05:42 »

Thanks for this man! I was dying for someone to make a linux clone of paint.net, because let's face it: pinta is horrible.
Plus, it's java  Grin!

P.S.
I am tempted to write my own, since you only need ImageIO to write Images. Thanks again!

Offline Longor1996
« Reply #5 - Posted 2013-09-28 14:10:51 »

I have a suggestion:
Make a PlugIn System for this!

I am planning to switch to Linux, but I need a 'Paint' that is (very) similar to Paint.NET.
And a PlugIn-System would finally allow me to make my own special effects!

- Longor1996

PS: I tried doing this too once, but failed already at the image-display.

Sorry for my bad English! That's because i am from Germany.
Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #6 - Posted 2013-09-28 14:18:59 »

Awesome! Are you going to implement a plug-in system? That would be neat.
Still lots of work to do, but I hope this works out beautifully.

Are you aware of this?

Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #7 - Posted 2013-09-28 20:32:11 »

Yes, I will add plugins if I am able to.

@farrell2k: Thanks, I was wondering how to centre the window. Just never bothered to google it.

Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #8 - Posted 2013-09-28 21:35:01 »

Maybe a good idea to add a preview window to see the overall image.
Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #9 - Posted 2013-09-29 02:50:20 »

Small update:

- Added Image Operations. Currently limited to Resize (Scale).
- Added Information Menubar. Shows the current tool, the zoom level, and whether or not you've saved your changes.
- The opened file appears in the window bar.
- Increased history to account for image operations.
- Windows/Dialogs appear in the centre of the screen.
- Probably a few other things I forgot to mention.

Download in OP.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Longarmx
« Reply #10 - Posted 2013-09-29 03:30:23 »

Very good. A couple suggestions:

1. I would like to see a little border surrounding each pixel so I know where the pixel boundaries are.
2. Maybe in addition to the text at the top, add an icon to the mouse pointer to know what tool is selected.
3. Maybe add a preview of the currently selected color.

Keep up the good work!

Offline kpars

JGO Wizard


Medals: 81
Projects: 4
Exp: 3 years


Extreme Typist.


« Reply #11 - Posted 2013-09-29 03:38:39 »

Just one suggestion:
Stop using the Metal L&F, switch to Nimbus. Or else, I will find you, and I will kill you.

To center the drawing frame, just try something similar to this:
1  
drawPanel.setLocation(((frame.getWidth() / 2) - (drawPanel.getWidth() / 2)), ((frame.getHeight() / 2) - (drawPanel.getHeight() / 2)));


- Jev.

Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #12 - Posted 2013-09-29 04:17:03 »

Okay, I'm not working on it right now, but the next update will hopefully include:

- Nimbus LookAndFeel (already implemented)
- Pixel Grid option under the View toolbar.
- Centred Canvas (done that already as well). By the way, I didn't need that code above. I just put the canvas into a JPanel, into the scroll pane instead of straight into the scroll pane.
- Some kind of tool settings, and if that gets done easily enough, maybe a paint brush.

Offline Regenuluz
« Reply #13 - Posted 2013-09-29 10:40:22 »

I'd give you a medal, but then you wouldn't have 111 medals and 11 projects. Sorry. xD

A suggestion, please make the color picker another size, preferably higher than it's wide, instead of how it is now. Also, please please make it not stick on top of all other windows, that's just annoying. xD

Other than that, it's looking good.

Cheers! Smiley
Offline Grunnt

JGO Wizard


Medals: 70
Projects: 8
Exp: 5 years


Complex != complicated


« Reply #14 - Posted 2013-09-29 18:40:08 »

Cool idea, I love it. Something absolutely essential for me that is currently missing is layers. It works smoothly on my laptop!

Also, just a random thought: how about using LibGDX with a Scene2d.ui GUI for this? For example Spine was made using this and looks just awesome. It also would make zooming in and out smoothly much better than is currently possible in Paint.NET. But that may be too much Grin

Good luck!

Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #15 - Posted 2013-09-29 19:24:33 »

But then he would have to rewrite the entire program and you'd have to include LibGDX as a library, making the whole download larger. There's honestly no point, just use Java2D so you only have to have Java installed, and you can keep the download tiny.

Online Jimmt
« League of Dukes »

JGO Kernel


Medals: 133
Projects: 4
Exp: 3 years



« Reply #16 - Posted 2013-09-29 19:58:39 »

No, you could just use scene2d and nothing else. And libgdx honestly doesn't take up that much space.
Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #17 - Posted 2013-09-29 21:05:02 »

@Regenuluz: What do you suggest I do instead of making the colour picker window stick on top of others?
Any other changes to the colour picker (size/shape) won't be made until after the next small update, as it would require me to actually program the pickers, instead of just rearranging the default Swing ones.

The Java2D library is based on modifying images, so why would I choose something else for making a program that does exactly that?

Layers are a future goal, and in fact the only area I was considering using OpenGL, due to the ease of blending. But I'll find a way to do it with just Java2D.

Pixel grid is working, along with ellipses (ellipses took a bit of math). Just need to get some tool options working, and I'll have another update ready.

Offline Regenuluz
« Reply #18 - Posted 2013-09-29 21:15:59 »

@Heroes, well, just let it act as any normal windows, so it can be hidden beneath e.g. the window you're actually painting in. Smiley

Obviously it wont be as much of a problem, once the size of the window is "better", but it's still nice for people with small screens etc.

And since I can see that someone else broke your 111 medals, I'm going to throw mine in now.
Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #19 - Posted 2013-09-29 21:21:40 »

Actually, the reason I made it stick was because in GIMP, I would lose the window and have to minimize everything else to get it back.
What you can do is just exit the window, and bring it back again when you need it. For now I'll put in a keyboard shortcut to toggle the visibility.

I'll look into shrinking it though.

Does anyone mind if the colour picker only has sliders? ie: No gradient square or swatches.

Offline wessles

JGO Wizard


Medals: 66
Projects: 4
Exp: 3 years


Profile picture isn't relevant.


« Reply #20 - Posted 2013-09-29 21:35:56 »

At this point, I think you could get away with it. But you should add in more color picking later...

Offline Longarmx
« Reply #21 - Posted 2013-09-29 22:13:40 »

I personally like the gradient square because it helps me visualize where I need to move the sliders to get a desired color.

I also think that you should keep it so that the color picker window stays on top. That was another pet peeve of mine with gimp.

Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #22 - Posted 2013-09-30 00:09:06 »

Okay, another small-ish update out.

Link to download in the OP.

Features:

- Ellipse Tool. (Hold ctrl to make a circle)
- Rectangle Tool. (Hold ctrl to make a square)
- Compacted Colour Chooser. More options to be added later. F5 to show/hide.
- Nimbus Look&Feel
- Centred Canvas
- Pixel Grid under View toolbar. Only works at 400%+ zoom.
- Invert Colour image operation.

I didn't implement tool-specfic options, but it is high on my todo-list.

Offline HeroesGraveDev

JGO Kernel


Medals: 260
Projects: 11
Exp: 2 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #23 - Posted 2013-09-30 03:14:11 »

Paint.JAVA is now on Github:

Here

Licensed under the GPL.

Feel free to poke around in the source if you want to know how I did something. Hopefully it's not too messy Wink.

Offline Longor1996
« Reply #24 - Posted 2013-09-30 10:04:49 »

Paint.JAVA is now on Github:

Here

Licensed under the GPL.

Feel free to poke around in the source if you want to know how I did something. Hopefully it's not too messy Wink.

Yay *forks the git*

Now to make some effects.
This is going to be a fun (math) time.

Also, this application is really useful for quick editing some images.
Reason being that Paint.NET takes 1 minute to start up on my PC, and that this is is made with Java.

- Longor1996

Sorry for my bad English! That's because i am from Germany.
Offline opiop65

JGO Kernel


Medals: 154
Projects: 7
Exp: 3 years


JumpButton Studios


« Reply #25 - Posted 2013-09-30 10:37:56 »

Whoa, a minute?? It should take closer to a few seconds, at worst like 10-15... Besides chrome, paint.net is one probably the fastest program in terms of opening speed on my computer currently.

Offline SHC
« Reply #26 - Posted 2013-09-30 10:45:42 »

It's taking upto three seconds to complete the paint bucket action.

Offline Mads

JGO Ninja


Medals: 26
Projects: 3
Exp: 6 years


One for all!


« Reply #27 - Posted 2013-09-30 12:07:33 »

It's taking upto three seconds to complete the paint bucket action.

Try with a 3k x 3k canvas. Whoa.

Offline Longor1996
« Reply #28 - Posted 2013-09-30 16:45:32 »

I was browsing through your code a bit so here is some stuff you could implement:
- Rectangle Fill Tool
- Ellipse Fill Tool
- Two Color Selection (Left = Primary Color, Right = Secondary Color)
- Some kind of very primitive plugin-system which only loads a JAR and calls a method with the Paint-Object as parameter.

Have an ice day!

- Longor1996

Sorry for my bad English! That's because i am from Germany.
Offline RobinB

JGO Ninja


Medals: 44
Projects: 1
Exp: 3 years


Spacegame in progress


« Reply #29 - Posted 2013-09-30 17:18:28 »

I vote for opengl rendering for blazing fast speeds Cheesy
Pages: [1] 2 3 4
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Pippogeek (39 views)
2014-09-24 16:13:29

Pippogeek (30 views)
2014-09-24 16:12:22

Pippogeek (20 views)
2014-09-24 16:12:06

Grunnt (45 views)
2014-09-23 14:38:19

radar3301 (28 views)
2014-09-21 23:33:17

BurntPizza (64 views)
2014-09-21 02:42:18

BurntPizza (34 views)
2014-09-21 01:30:30

moogie (42 views)
2014-09-21 00:26:15

UprightPath (50 views)
2014-09-20 20:14:06

BurntPizza (54 views)
2014-09-19 03:14:18
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!