sprang / Inkpad

Vector illustration app for the iPad.
Mozilla Public License 2.0
2.64k stars 474 forks source link

Feature Request: basic photo editing tools #119

Open gverma14 opened 10 years ago

gverma14 commented 10 years ago

It would be nice to have a set of basic photo editing tools (such as brightness, contrast, auto-enhance, I can't think of anymore but you get the idea). This would be useful for imported photos.

jimbox13 commented 10 years ago

I wonder, do you mean photo editing color tools for the imported raster images or color tools for the vector line objects? I think they added color tools for vector shapes in a recent version. (Have to check for sure.)

gverma14 commented 10 years ago

They have color tools for vector line and shape objects I know.

I'd specifically like the ability to have color tools and brightness, contrast, etc. editing tools for imported photos (.jpg, .png, .bmp, etc)

jimbox13 commented 10 years ago

I see. It makes sense to me... I wonder if raster image color adjustment is part of the standard SVG specification?

sweetmandm commented 9 years ago

@jimbox13 Color adjustment for raster images would be applied with SVG filters, which Inkpad does not support. IIRC, on export Inkpad defines the image with embedded image data and references it throughout the document with <use>, so you would need to apply the raster effect to the image and then embed a separate image in the exported SVG for each adjustment/variation.

jimbox13 commented 9 years ago

or discard the original raster and replace it with the adjusted one? not the best solution but it could work. You'd probably want to let the user know that the raster image is being permanently altered.
or... implement SVG filters

sweetmandm commented 9 years ago

Yeah that could also work, all identical <image>s share the same def, so if you want the modified image to be distinct you'd have to duplicate it first and then modify the duplicate, otherwise all instances of the image would be modified simultaneously.

SVG filters could be implemented...if you re-implement Core Graphics in OpenGL and build it with support for the different filters defined in the SVG spec :P. It's a major point where SVG is at odds with the Core Graphics api -- SVG filters can be combined in lots of different ways to produce interesting effects that are not possible when you use Core Graphics to render into a single layer. (filters might conceivably be hacked together if everything was rendered into a tree of layers or views, but that would be a major effort and would very likely kill performance).

For example, shadows in SVG are created by combining several filters as described here: http://www.w3schools.com/svg/svg_feoffset.asp But Core Graphics doesn't have any of that, it has its own simple way of drawing a shadow for a path. That's why inkpad keeps shadows in the inkpad namespace, and they won't export to/import from other SVG apps.