Can GIMP save paths in JPEG format?


#1

I tried saving in TIFF and path is there.
I have seen photoshop save path in JPEG.
I saw this post but it was back in 2007, is JPEG support now?
https://bugzilla.gnome.org/show_bug.cgi?id=131982


(Tobias) #2

I’ve just created a new file with a path and saved it as JPEG. Then I closed and opened the file and the path was gone. So path saving or path loading or both does not work with GIMP. The same thing with TIFF worked. You should open a bugreport with an example image added.


#3

I not sure that it was a bug or not, I think it is something that is not implement.


(Morgan Hardwood) #4

Paths require an alpha channel and the regular JPEG format doesn’t support alpha channels so I don’t see how this is a bug.

What does seem like a bug is that an RGBA PNG with transparency does not preserve the path while an RGBA TIFF with transparency does.


#5

If that was the case that JPEG don’t support paths, how does ps do it?


#6

Photoshop seems to store path info in meta data.


(Tobias) #7

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.


(Tobias) #8

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


(Tobias) #9

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.


(Morgan Hardwood) #10

@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>

#11

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

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


#12

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.


#13

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.


(Tobias) #14

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

I’ve tested TIFF.


(Glenn Butcher) #15

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


#16

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


#17

@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) https://wiki.scribus.net/canvas/How_to_Isolate_an_image_and_create_a_clipping_path_for_text_flow


#18

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.


(Mica) #19

You can file enhancement requests at https://gitlab.gnome.org/GNOME/gimp

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


#20

Requested