Can GIMP save paths in JPEG format?

A path doesn’t require an alpha channel. A path is just extra information to an image. You can use a path as clipping path, but even then you don’t need an alpha channel in the image.

That’s what I’ve expected and the same what Adobe does with tiff images.

Yes, it’s not a bug but a feature request and in the new terminology of gitlab it’s an issue. The old System Gimp used, bugzilla, called every entry a bugreport.

@Tobias you’re right, GIMP uses metadata and not the alpha channel:

  Clipping path:
<?xml version="1.0" encoding="iso-8859-1"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1920" height="1080">
<g>
<path fill-rule="evenodd" style="fill:#000000;stroke:#000000;stroke-width:0;stroke-antialiasing:false" d="
M 410 216
L 410 689
L 1128 689
L 1128 216
L 410 216 Z
"/>
</g>
</svg>

No, you didn’t. You exported it. :wink:

Which makes sense, given a path is vector data and not raster.

1 Like

So does GIMP support embedding path in JPEG meta data? Only TIFF and EPS for now right? Many people like to embed path meta data in JPEG for submitting image to stock photo.

I export all my paths as SVG. That makes it universal when importing into another program like Inkscape. File size is very small. Don’t want to use any other format for paths.

No. What was not clear about my first answer? And why don’t you test it yourself?

I’ve tested TIFF.

Do you have a JPEG so endowed that you could post here? I’d be curious to see how it’s done…

I don’t have ps with me, but it can be done by simply save as JPEG

@ggbutcher

A PS jpeg with a clipping path try this one:

Run it through ImageMagick identify -verbose and you will see the section where it is incorporated as an svg path.

Back to the original question and of course (clipping) paths are not in the jpeg standard. Very much a PS thing.

In practice an example using Scribus: two images stacked: https://i.imgur.com/8gDXq2H.jpg
Then with the clipping path invoked: https://i.imgur.com/CMSKB7F.jpg

As mentioned earlier, You can use a tif and a good example using Gimp (again scribus) How to Isolate an image and create a clipping path for text flow - Scribus Wiki

Thanks for answer, the problem is that to be able to send to stock image website, they only accept JPEG and not TIFF. So maybe we could revisit this improvement later.

You can file enhancement requests at GNOME / GIMP · GitLab

You could also use exiftool/exiv2 to copy the metadata from a tiff that contains the vector path to the jpeg metadata.

Requested

For reference:

I understand why a path would not be saved with a jpg but I really think Gimp should save the path with a .png image
When you think how large an .xcf file is compared to .png it sure would be convenient if you could save a path in png image.

Then please open a issue and add an example file.

Would this realy be an issue or more a feature request.

Of cause it’s a feature request. But Gimp has only an “issue tracker” and you have to press the button “New Issue” and then select the feature request template.

@kevin_tee or anyone else here, Alx Sa aka @CMYK-Student is implementing loading clipping path metadata from JPEGs at the moment and needs more test/sample files. Could you provide more and upload them here or here:

@holes-in-sock if you have any PNGs with paths I think now its the best time to add them here too because I think it should be similar to implement. (I could not find any with a fast internet search.)