Is there a tutorial to make a jpg curve? Or what's it called?

Post questions on how to use or achieve an effect in Inkscape.
User avatar
eDee
Posts: 17
Joined: Sun Feb 11, 2018 5:08 am
Location: Maine
Contact:

Is there a tutorial to make a jpg curve? Or what's it called?

Postby eDee » Wed Feb 14, 2018 3:39 am

I'm not exactly sure what to call this, so trying to find a YouTube video is becoming impossible.

I need to make a jpg image curve up slightly on both ends.

Please - What should I search for? What is that called?

https://www.dropbox.com/s/sfqt8pg71sp74 ... e.jpg?dl=0

Thank you

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Is there a tutorial to make a jpg curve? Or what's it called?

Postby Moini » Wed Feb 14, 2018 5:09 am

Nothing that can be done with Inkscape, if you want to deform a jpg, and not a vector image.

Use gimp, with its envelope deformation or other transformations (maybe you want barrel?), or use your Photoshop, if it's able to do it.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Is there a tutorial to make a jpg curve? Or what's it called?

Postby Lazur » Wed Feb 14, 2018 6:54 am

Moini wrote:Nothing that can be done with Inkscape, if you want to deform a jpg, and not a vector image.


Except for filtering, which is what a raster image editor does too.
Theoretically it is possible, however with the hard-wired limitations it cannot really/easily be geometrically perfect.

See this:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Filters-Pixel.html#Filters-DisplacementMap

first step: instead of a curve, you need a similar kind of input as this image: Image

Displacement filter primitive cannot use a different input source for x and y directions.
The displacement in the x direction may not be zero if you want the image to look like wrapped around a cylinder, but it'd be a good start/easier to implement.

The svg specs doesn't let a displacement value be set 0 though, it has to be either +-1 relatively.
The primitive is using the rgba channels, and each px value goes from 0 to 255, with 127 or 128 representing the "zero" distortion.
For x to be undistorted -as much as possible-, one of the channels needs to be 127.

The rest is figuring out what values/how should they follow eachother on the input image for the y distortion.
Where there is another limitation -the largest displacement is 100 px.
Either it takes repeated filter primitives with the same settings or scaling up the filter applied on the raster image...
Where it may hit another barrier of the scaling -Mach banding issue of low bitrange- leads to "grainy" output. Which could be helped with a bit of dithering, but still...

All in all it is a bit of complicated but technically possible to some extent.



Instead of filtering, the most straightforward solution for a geometrically perfect image would be modelling the surface in 3D, adding the jpeg as a texture and rendering the result. Works with any shape, yet the inkscape filter could work as a "close enough" ducttaping for a specific use.


Return to “Help with using Inkscape”