EzDevInfo.com

image-editor

A simple image editor - via CSS properties. Image Editor | Vikas Lalwani

Open source .NET vector graphics editor [closed]

Does anyone know of any open source vector editors written in a .NET language?

I know Inkscape is very popular, but it is written in C++. The only .NET one I know of is XDraw, but would like something more active or with more features.


Source: (StackOverflow)

image editor for JSP website

I am a beginner in image editing. I am working on a JSP website. My client need image editing in the website like resizing the images, crop the images, add frame to the images. Is there any plug in available for this purpose? can i get any jquery plug in for this? I had gone throw the some questions already been posted. But they where not much helpful for my purpose.


Source: (StackOverflow)

Advertisements

java save jpg as png

I have an image on disk which is a jpg file . I want to convert and save it as png and delete original jpg. Whats best way to do this in java?

String justNameJpg = "something.jpg";
String justNamePng = ImageEditor.GetImageNameNoExtension(justName) + "." + "png";
java.awt.image.BufferedImage bufferedImage = ImageIO.read(new File(folder, justNameJpg));
ImageIO.write(bufferedImage, "png", new File(folder, justNamePng));

Source: (StackOverflow)

ASP.net image editor with layering

I need an image editor which I can add to my ASP.net project, as an image editor for DMS, so user can open the selected image with the desired editor and then he can edit and add new layer (i.e. his signature).

I need something just like this http://pixlr.com/ but the problem with the latter is being online only !!


Source: (StackOverflow)

Android Image Editor

I want to create an Android app where I can take a picture from the SD card or from the camera. After taking the picture, I have to edit it, like adding text in the picture, cropping the picture, add .gif type file to the picture. Taking a picture isn't the problem, but I can't understand how to write code to edit the picture. I need to know whether I have to use OpenGL for this. Suggestions and helpful links wanted.


Source: (StackOverflow)

Open Source Web Based Image Editor

I'm looking for image editor with the same functionality with Paint.

It should have at least basic features like: 1. Open image file from PC. 2. Pencil Freehand Draw 3. Draw Oval or Circle 4. Draw Rectangle

This question is related with: Free Open Source In-browser image editors

But there is no accepted answer yet.


Source: (StackOverflow)

Java Image Editor which renders output as source code?

Alex explained what I'm looking for much better than I have:

You want an existing program that allows you to draw a picture, captures what you do as you draw, and writes each action as a Java command. When you click the "Drawl Oval" tool and click at 0,0 and then at 50,50, it would generate the line g.drawOval(0,0,50,50).

If anybody knows of a program such as this, let me know. Thanks.


Original question:

I've been working with Java and custom drawing using the java.awt.Graphics library lately, but find it is taking too much time to write manually. Is there any simple graphics editor (like mspaint) which generates source code?

Example:

Drawing this: alt text

Would generate:

public void update(Graphics g) {
    g.translate(0, 0);
    g.drawOval(0, 0, 50, 50);
}

Thanks.


Source: (StackOverflow)

How to create extension to curve texts in svg-edit?

I want to use svg-edit plugin in my project. Now I want to create extension to curve texts like:

svgEditor.addExtension("Curve text!", function() {'use strict';
        return {
            name: "Curve text",
            svgicons: svgEditor.curConfig.extPath + "text_curve-icon.xml",

            buttons: [{
                id: "text_curve", 
                type: "mode", 
                title: "Curve the text", 
                events: {
                    'click': function() {
                        svgCanvas.setMode("text_curve");

                        var textElement = $(svgCanvas.getSelectedElems()[0]);

                        var textPath =  '<text>' +
                                        '   <textPath xlink:rel='nofollow' href="#relativeCurve">' +
                                            $(svgCanvas.getSelectedElems()[0]).text() +
                                        '   </textPath>' +
                                        '</text>';
                        $('#svgcontent').prepend('<defs><path d="m0,350c100,-100 200,-200 300,-200c100,0 200,200 300,200c100,0 200,-200 300,-200" id="relativeCurve"/></defs>');
                        $(textElement).replaceWith(textPath);
                    }
                }
            }],
            mouseDown: function() {
                if(svgCanvas.getMode() == "text_curve") {
                    return {started: true};
                }
            },

            mouseUp: function(opts) {
                if(svgCanvas.getMode() == "text_curve") {
                }
            }
        };
});

But it doesn't work, how can I create this?


Source: (StackOverflow)

Are there any free java/flash image editor plug-in/applets that i can include in my site? [closed]

I am currently re-developing an e-commerce back end system and I was wondering if anyone here had come accross a free ajax script/plug-in/flash file which could allow our users to upload an image and offer some basic editing tools, i.e. crop, rotate, resize?

We currently have a PHP based image resizing tool using the GD library that simply reduces the image down to the correct dimensions but I was hoping we could add in some Flickr style functionality to spruce up their images a bit before placing them on the site.

I'm not too fussed what language it is in or how it is implemented. The important things are that it is free (or v. cheap) and that it is ok for commercial use.


Source: (StackOverflow)

Errors when adding an action to a JFrame button to edit a picture previously selected

I am trying to make a ImageEditor in Java, for a school project. Until now I managed to make with JFrame the menu with two submenus: open - where i can search for a picture and see it in the main window; and clear - where i clear the main window. This part works okey. Lately I added also with Jframe 4 buttons, in order to edit the picture and make it grayscale, in sepia tones, negative or red/green/blue.

I am still stuck at the first button where I need to make the picture in grey tones. I found the algorithm but i have no idea how can i get rid of this errors.The code looks like this:

package myPackage;
import javax.swing.*;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.io.File;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;


public class ImageEditor extends javax.swing.JFrame {
    JFileChooser img = new JFileChooser();
    static BufferedImage image;

public ImageEditor() {
    initComponents();
}
private ImageEditor(BufferedImage image) {
    this.image = image;
}

private static void write(BufferedImage image, String jpg, JFileChooser img) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

private static void write(BufferedImage image, String jpg, File f) {
    throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}

@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">                          
private void initComponents() {

    jSP = new javax.swing.JScrollPane();
    jB_Greyscale = new javax.swing.JButton();
    jB_Sepia = new javax.swing.JButton();
    jB_RGB = new javax.swing.JButton();
    jB_Negative = new javax.swing.JButton();
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jMI_Open = new javax.swing.JMenuItem();
    jMI_Clear = new javax.swing.JMenuItem();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

    jB_Greyscale.setText("Black & White");
    jB_Greyscale.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_GreyscaleActionPerformed(evt);
        }
    });

    jB_Sepia.setText("Sepia");

    jB_RGB.setText("Red/Green/Blue");

    jB_Negative.setText("Negative");

    jMenu1.setText("File");

    jMI_Open.setText("Open");
    jMI_Open.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMI_OpenActionPerformed(evt);
        }
    });
    jMenu1.add(jMI_Open);

    jMI_Clear.setText("Clear");
    jMI_Clear.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jMI_ClearActionPerformed(evt);
        }
    });
    jMenu1.add(jMI_Clear);

    jMenuBar1.add(jMenu1);

    setJMenuBar(jMenuBar1);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                .addComponent(jB_Greyscale, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jB_Sepia, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jB_RGB, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jB_Negative, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jSP, javax.swing.GroupLayout.DEFAULT_SIZE, 285, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jSP)
        .addGroup(layout.createSequentialGroup()
            .addComponent(jB_Greyscale)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jB_Sepia)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jB_RGB)
            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
            .addComponent(jB_Negative)
            .addGap(0, 169, Short.MAX_VALUE))
    );

    pack();
}// </editor-fold>                        


//Create a label
JLabel jlab = new JLabel();
private void jMI_OpenActionPerformed(java.awt.event.ActionEvent evt) {                                         
    //Creez file chooser
    JFileChooser jfc = new JFileChooser();
    //Selectez poza si o afisez
    if(jfc.showOpenDialog(jMenu1) == JFileChooser.APPROVE_OPTION){
        //Select the path
        java.io.File f = jfc.getSelectedFile();

        //Set icon
        jlab.setIcon(new ImageIcon(f.toString()));

        //Alignment
        jlab.setHorizontalAlignment(JLabel.CENTER);

        //Add label for jScrollPane
        jSP.getViewport().add(jlab);

        //Save image for futher edit
        img = jfc;
    }   
}                                        

private void jMI_ClearActionPerformed(java.awt.event.ActionEvent evt) {                                          
    //Clear image from jlabel jlab
    jlab.setIcon(null);
}                                         



private void jB_GreyscaleActionPerformed(java.awt.event.ActionEvent evt) {                                             
    //Get image dimension
    ImageEditor.write(image,"jpg",img);
    int width = image.getWidth();
    int height = image.getHeight();
    int p = 0, a, r, g, b, avg, y, x;

    //Convert to grayscale
    for(y = 0; y < height; y++){
        for(x = 0; x < width; x++)
            p = image.getRGB(x,y);
            a = (p >> 24)&0xff;
            r = (p >> 16)&0xff;
            g = (p >> 8)&0xff;
            b = p >> 0xff;

            //Calculate the average
            avg = (r+g+b)/3;

            //Replace RGB values with the average
            p = (a << 24) | (avg << 16) | (avg << 8) | avg;

            image.setRGB(x, y, p);
    }       

    File f = new File("C:\\Users\\Iulia\\Grayscale.jpg");
    ImageEditor.write(image, "jpg", f);
}                                            

public static void main(String args[]) {
    try {
        for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                javax.swing.UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (ClassNotFoundException ex) {
        java.util.logging.Logger.getLogger(ImageEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (InstantiationException ex) {
        java.util.logging.Logger.getLogger(ImageEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (IllegalAccessException ex) {
        java.util.logging.Logger.getLogger(ImageEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    } catch (javax.swing.UnsupportedLookAndFeelException ex) {
        java.util.logging.Logger.getLogger(ImageEditor.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
    }
    //</editor-fold>

    /* Create and display the form */
    java.awt.EventQueue.invokeLater(new Runnable() {
        public void run() {
            new ImageEditor().setVisible(true);
        }
    });

}

// Variables declaration - do not modify                     
private javax.swing.JButton jB_Greyscale;
private javax.swing.JButton jB_Negative;
private javax.swing.JButton jB_RGB;
private javax.swing.JButton jB_Sepia;
private javax.swing.JMenuItem jMI_Clear;
private javax.swing.JMenuItem jMI_Open;
private javax.swing.JMenu jMenu1;
private javax.swing.JMenuBar jMenuBar1;
private javax.swing.JScrollPane jSP;
// End of variables declaration                   
 }

And the error i get when i click on the grayscale button:

Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException: Not supported yet.
at myPackage.ImageEditor.write(ImageEditor.java:33)
at myPackage.ImageEditor.jB_GreyscaleActionPerformed(ImageEditor.java:155)
at myPackage.ImageEditor.access$000(ImageEditor.java:21)
at myPackage.ImageEditor$1.actionPerformed(ImageEditor.java:59)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2346)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6525)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3321)
at java.awt.Component.processEvent(Component.java:6290)
at java.awt.Container.processEvent(Container.java:2234)
at java.awt.Component.dispatchEventImpl(Component.java:4881)
at java.awt.Container.dispatchEventImpl(Container.java:2292)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4898)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4533)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4462)
at java.awt.Container.dispatchEventImpl(Container.java:2278)
at java.awt.Window.dispatchEventImpl(Window.java:2739)
at java.awt.Component.dispatchEvent(Component.java:4703)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:746)
at java.awt.EventQueue.access$400(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:697)
at java.awt.EventQueue$3.run(EventQueue.java:691)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.awt.EventQueue$4.run(EventQueue.java:719)
at java.awt.EventQueue$4.run(EventQueue.java:717)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:716)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Source: (StackOverflow)

Editor like Zoomin album creator in Android

I want to make an editor in which I can take one image as background and can drag and drop small images to make some pattern over the background image. I also wish to add EditTexts over there and want to export the generated image. Can anyone guide me how to design such an editor ? (Note that I want to add multiple images in the editor and want a single output image.)

Is there any open source code or API available for the same ?


Source: (StackOverflow)

Can we customize the onSave handler in Aviary?

I have tried on the Aviary SDK, is a amazing images editor tools for developer. It really save our time to develop all the function for images edit.

But, one concern about the onSave handler, Aviary will send the edited image to their cloud server, and host it for 72 hours. Therefore, am I right to say we have to make sure our apps has connection with the Adobe cloud? This cloud be a problem if abode cloud service down or Adobe stop the service?

So, anyway to customize the 'onSave' handler for Aviary?

Thanks.


Source: (StackOverflow)

Java - Cannot gather 2D array inside vector

As I mentioned in my previous (not ansvered) question, I'm making a image editor that can be embeded to my program. So I came to a point, where I decided that image editor must have undo and redo. So I wrote this code:

public Vector<Color[][]> undo = new Vector<Color[][]>();
size = 16;
public Color[][] chroma = new Color[size][size];
//These are variables

public void saveRevision(){
    System.out.println("Saving: " + current);
    undo.insertElementAt(chroma.clone(), current);
    current++;
    /*for (int i = 0; i < (undo.size()-1); i++) {
        if(i > current){
        undo.remove(i);
        }
    }*/
}

public void undo(){
    if(current > 0){
        System.out.println("Gathering: " + (current-1));
        current--;
        /*Color[][] c = undo.get(current);
        for (int i = 0; i < c.length; i++) {
            for (int j = 0; j < c[i].length; j++) {
                System.out.print(c[i][j]);
            }
            System.out.println();
        }*/
        /*for(int i = 0; i < size; i++){
            for(int j = 0; j < size; j++){
                chroma[i][j] = null;
            }
        }*/
        chroma = undo.get(current);
        repaint();
    }
}

public void redo(){
    if((undo.size()-1) > current){
        System.out.println("Gathering: " + (current+1));
        current++;
        for(int i = 0; i < size; i++){
            for(int j = 0; j < size; j++){
                chroma[i][j] = null;
            }
        }
        chroma = undo.get(current);
        repaint();
    }
}

The problem is that I somehow cant write inside an array from that vector that has all the chroma revisions. As you can see, I tried everything, but "chroma" variable does not seem to be changed. Em I doing something wrong?

Just forgot to mention: Undo and Redo are triggered using JButton, Revision is made everytime the mouse button is released.


Source: (StackOverflow)

how to view encrypted picture

how do people view encrypted pictures like on this wiki page? is there a special program to do it, or did someone decide to do some silly xor just make a point about ECB? im not a graphics person, so if there are programs to view encrypted pictures, what are they?


Source: (StackOverflow)

Can't find Graphics item in Visual Studio 2012 "Add New Item" dialog

I need to add an image via the Visual Studio 2012 (Ultimate) Add New Item option. When I activate this option I get the Add New Item dialog box. Under the Installed node, I see many different options for the new item type. However, I do not see the Graphics item as specified in this MSDN article:

Image Editor

I checked ever node and child node in the New Item pane, including the Online node, just in case. Nothing (see image below). Can someone tell me why I can't find the Graphics as a new item type and how to add it to the New Item choice list? The project is a Windows Phone 8 project if that is relevant.

enter image description here


Source: (StackOverflow)