Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (686)
Games in Android Showcase (198)
games submitted by our members
Games in WIP (758)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 4 5 [6] 7 8 ... 10
 51 
 on: 2016-08-23 21:08:41 
Started by Wave Propagation - Last post by Wave Propagation
Hello,

I've created an image processing program that I'd like you guys to test if you so wish.

It can do the following:
- Open images such as .BMP, .GIF, .JPG, .PNG and .WBMP.
- Save images such as .BMP, .GIF, .JPG, .PNG and .WBMP.
- Turn an image into grayscale using the following: R (red), G (green), B (blue), Average, Lightness and Luminosity.
- Use Sepia Tone filtering.
- Use Tone Mappers and Gamma Correction such as: Filmic Curve, Linear and Reinhard.
- Apply Convolution Filters such as: Blur, Detect Edges, Emboss, Gradient (Horizontal), Gradient (Vertical) and Sharpen.
- Apply your own Convolution Filters via a Custom Convolution Filter matrix.
- Execute Java source code to modify the image (which requires tools.jar).
- Rotate: 90 or 180 degrees.
- Invert the colors of an image.
- Select a portion of the image to perform the image processing on.
- You may tell the program whether it should do the image processing in the same tab or a new one.

The program is internationalized and currently supports English and Swedish.

Discuss it here! If you have any thoughts on it or want some new feature in it, please let me know.

Download: http://www.megafileupload.com/ob5U/org.dayflower.image-0.0.1.zip
Website: http://www.dayflower.org/image.html


 52 
 on: 2016-08-23 20:14:05 
Started by tariqbroadnax - Last post by tariqbroadnax
If you try to send it over a object stream, a new Point2D is created where x and y are 0.

Outside of not serializing it, the only other solution is extends the class and make it serializable.
^ This doesn't work either.

I found about this at the following link:
https://bugs.openjdk.java.net/browse/JDK-4263142


Nvm. I fixed the issue. Point2D.Double is serializable.
The issue was that my object was not changing because I was not reseting my stream. Took 2-3 hours to find that out. x.X

 53 
 on: 2016-08-23 20:03:02 
Started by Archive - Last post by Riven
Don't forget you can use dithering to approximate colors (in groups of pixels).

Here I created code to approximate any RGB input in the EGA16 palette (obviously only 16 colors)
http://www.java-gaming.org/topics/tinygame-resources/22266/msg/184436/view.html#msg184436




If you add animation, you can dither in the 3rd dimension (time).
Click to Play
I remind you, these are just 16 colors, evenly spaced out colors in the RGB color space, which means I probably use only 8-12 per frame in this specific image.

Just run this JAR for yourself:
http://indiespot.net/files/ega-dithering.jar

It should be relatively easy to use this concept to match an arbitrary palette.

 54 
 on: 2016-08-23 19:51:26 
Started by leSpace - Last post by richierich
Is there any other way to generate random shapes ?
Another way would be kick off a dot to crawl across the plane which turns randomly but with a general preference for turning right. So eventually it'd cross its own tail like the snake game. Various tweakable parameters there to get different kinds of shapes.

Or tile a plane with some shape, either regular or e.g. voronoi tiles or something, then start with one tile and flood-fill a random number of tiles out from that based on some randomized way of selecting the next tile to fill. Actually I guess you could do that with just the pixels as a square "tiling" too and skip a step.

Or capture an image from the device's camera, posterize it somehow and pick out an edge. That's real-world input so arguably truly random, but maybe would always be a thumb shape.

What's the application? Do they have to look like something in particular? Clouds or caves or something?


 55 
 on: 2016-08-23 19:49:23 
Started by lcass - Last post by basil_
what happens if you render untextured ?

 56 
 on: 2016-08-23 18:47:09 
Started by lcass - Last post by lcass
I'm probably being an absolute idiot here ( as usual ) , i'm trying to render a simple shape in my new graphics engine and while the window is shown no image is shown on the screen. Below is the relative code.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
public void render() {
      GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
      int index = 0;
      for(index = 0; index < buffer_objects.size();index++){
         BufferObject render_object = buffer_objects.get(index);
         vbo_core.bind_shader();
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBindTexture(GL11.GL_TEXTURE_2D, render_object.texture.id);
         GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, render_object.vertex_id);
         GL20.glEnableVertexAttribArray(vbo_core.locationattribvertex);
         GL20.glEnableVertexAttribArray(vbo_core.locationattribtex);
         GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER,render_object.vertex_id);
         GL20.glVertexAttribPointer(vbo_core.locationattribvertex, 2,
               GL11.GL_FLOAT, false, 0, 0);
         GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, render_object.texture_id);
         GL20.glVertexAttribPointer(vbo_core.locationattribtex, 2,
               GL11.GL_FLOAT, false, 0, 0);
         // Draw the textured rectangle
         GL20.glUniform2f(vbo_core.locationdimension, width, height);
         GL20.glUniform2f(vbo_core.locationtransform, render_object.translation.x,
               render_object.translation.y);
         GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, render_object.vert_count);
         
         GL20.glDisableVertexAttribArray(vbo_core.locationattribvertex);
         GL20.glDisableVertexAttribArray(vbo_core.locationattribtex);

         GL11.glEnable(GL11.GL_BLEND);
         vbo_core.un_bind_shader();
      }
     
   }

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public int create_buffer(int size , Vertex2d[] data,Texture t){
      int index = create_buffer(size,t);
      BufferObject buffer = buffer_objects.get(index);
      for(Vertex2d vertex :data){
         buffer.verticies.put(vertex.x);
         buffer.textures.put(vertex.u);
         buffer.verticies.put(vertex.y);
         buffer.textures.put(vertex.v);
         buffer.vert_count+=2;
      }
      buffer_objects.set(index,buffer);
      buffer.flip();
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.vertex_id);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer.verticies, GL15.GL_STREAM_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.texture_id);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER,   buffer.textures, GL15.GL_STREAM_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
      return index;
   }


Any help an obvious error pointing out would be helpful.

 57 
 on: 2016-08-23 18:29:44 
Started by leSpace - Last post by leSpace
Thank you, that was exactly what i was looking for.

 58 
 on: 2016-08-23 17:55:37 
Started by leSpace - Last post by Archive
This: https://en.wikipedia.org/wiki/Graham_scan ?

 59 
 on: 2016-08-23 17:53:53 
Started by leSpace - Last post by leSpace
Thanks that's really simple and what i needed, though i now remmbered that there is an algorithm given a set of points return the points that would constitute the summits of the smallest polygon enclosing this set of points but I can't remember how it worked nor its name, any idea ?

 60 
 on: 2016-08-23 17:48:54 
Started by leSpace - Last post by Archive
I believe that a simple way to check if a line in the polygon is an edge line is to make planes out of all the lines and determine whether or not they have any vertices on both sides. If it does have vertices on both sides, then it's not an edge, if it only has vertices on one side of the plane, it's an edge.

Pages: 1 ... 4 5 [6] 7 8 ... 10
 
roseslayer (420 views)
2016-08-06 11:43:29

roseslayer (381 views)
2016-08-06 09:43:11

xTheGamerCodes (458 views)
2016-08-04 15:40:59

xTheGamerCodes (452 views)
2016-08-04 15:40:24

orrenravid (801 views)
2016-07-16 03:57:23

theagentd (877 views)
2016-07-11 14:28:54

Hydroque (973 views)
2016-07-06 05:56:57

Hydroque (994 views)
2016-07-03 08:52:54

GrandCastle (806 views)
2016-07-01 09:13:47

GrandCastle (637 views)
2016-07-01 09:09:45
Rendering resources
by Roquen
2016-08-08 05:55:21

Rendering resources
by Roquen
2016-08-08 05:52:42

Rendering resources
by Roquen
2016-08-08 05:50:38

Rendering resources
by Roquen
2016-08-08 05:49:53

Rendering resources
by Roquen
2016-08-08 05:32:39

Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42
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!