• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AI loses image fill when opening SVG

Community Beginner ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

The attached file opens just fine in a browser, yet when opened with AI the shape has no fill.

Adobe Illustrator 26.5, macos Monterey, M1 Macbook Pro.

 

Screen Shot 2022-10-14 at 8.54.02 PM.png

TOPICS
Bug

Views

206

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Oct 14, 2022 Oct 14, 2022

Copy link to clipboard

Copied

I would assume there are just too many groups inside groups.

Screenshot 2022-10-14 at 12.29.10.png

 

You should never bring yourself into a situation where you have to re-open an SVG in Illustrator. For Illustrator SVG is an export format. It's famous for not being able to read its own SVGs.

 

Your work file should be AI.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 16, 2022 Oct 16, 2022

Copy link to clipboard

Copied

Yes, I'm well aware that AI has problems reading SVGs it creates. I have also reported to Adobe how it adds extra groups when saving SVGs that contain shapes with clipped image fills. Their responses, as I follow up, are either "it was fixed in the latest release, please upgrade" or "it will be fixed in the next release", both of which have yet to be proven true. Speaking as an experienced software developer, fixing this bug in AI should be very straightforward.

 

I have also seen the open time message about an SVG having too many nested groups and warning that content may be lost, and so have a Python script to remove these extraneous groups before reopening the file. The above example though does not give this warning.

 

My conclusion is that Adobe have intentionally decided to add those extra groups and not always warn about them in order to deter the use of AI for round-trip SVG work. Interestingly, a competing product also introduces unnecessary groups when exporting SVGs. We though have now found another product that does work well for editing SVGs and will be dropping the use of Illustrator.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2022 Oct 16, 2022

Copy link to clipboard

Copied

The only serious application that uses SVG as its native file format, is Inkscape.

 

When an application doesn't use SVG as its native file format, it will always have to covert the document, thus changing the structure and introducing nasty stuff as well as deleting probably important stuff. And that is why you should not roundtrip SVG files with Illustrator.

 

Even Inkscape has 2 flavours of SVG: the super native ones that contain native elements and the standard ones that only have things in it which are fully covered by the SVG standard.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

FYI, Boxy SVG is a comprehensive editor with an intuitive and clean interface that uses SVG as its native format -- in my opinion it is easier to use than either Inkscape or Illustrator. Most importantly, it doesn't corrupt SVG files. I fail to understand why Adobe claims that AI supports SVG when it clearly doesn't.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

"Native file format" is a completely different thing than being able to export a valid file. Illustrator is older than SVG and it can do many things that SVG doesn't support - e.g. CMYK, meshes or flood fill. You probably wouldn't find a lot of people who would gladly give that away in exchange for native SVG documents.

 

If you want something changed: http://illustrator.uservoice.com

Changing the native file format is probably not within reach.

 

As for "Boxy SVG": I would like my vector app with decent functionality. YMMV

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

Hi Monika,

 

I fully appreciate the history of Illustrator and SVG and the limitations of SVG wrt AI's native format.

 

Our requirement is to create vector images as input sources to our open-source map generation toolchain, and for this we require non-proprietary file formats. SVG is an ideal candidate, and AI, with its ability to export SVG and rasterise blends and fills into clipped images, along with its apparent ability to round-trip SVGs, appeared to be the best tool to use.

 

This though has not proved to be the case, with image filled shapes undergoing subtle and not so subtle corruption, which we have now identified as being caused by Illustrator itself. From a technical POV the fix is straightforward, and if AI was not closed source there would be a pull request ready for merging. Adobe has acknowledged that there are bugs in AI's SVG implementation, yet the promised fixes have yet to appear, and you, presumably as a user, are saying not to use AI for SVG work. Why can't Adobe make it clear, in its documentation and product material, that even though Illustrator will open and save SVG files, it is not to be used for round-trip SVG work??

 

Best regards,

David Brooks

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

I think you are misinterpreting stuff here and you are misquoting me.

 

I don't know where you found out about "ability to round-trip SVGs", because wherever I'm reading about SVG in Illustrator, people advise quite the contrary.

 

"the fix is straightforward" ... make SVG the native file format - just do it now? I assume you just wildly underestimate the complexity of Illustrator. A lot of the stuff it can do is just not supported by SVG as a file format.

 

"you, presumably as a user, are saying not to use AI for SVG work" ... that's not what I am saying. All I am saying is that SVG should not be your work file. Do not roundtrip SVG in Illustrator. And once again: When reading an SVG, Illustrator will convert it to its native file format, which is AI. And when writing an SVG, there will be another conversion.

 

That pink object which you have designed, looks like a gradient mesh or even a freeform gradient. And obviously you want to use Illustrator, because it has this functionality. Then I do not understand why you insist that Illustrator uses SVG as its native file format, because SVG does not support these kinds of objects or attributes. You cannot save this into an SVG while preserving the editability. So, what do you want?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Oct 17, 2022 Oct 17, 2022

Copy link to clipboard

Copied

LATEST

"I don't know where you found out about "ability to round-trip SVGs", because wherever I'm reading about SVG in Illustrator, people advise quite the contrary."

 

Is it not unreasonable to assume that if an application's `Open file` will open and read a particular file format, and then its `Save` saves the opened file in exactly the same format as it used to open it, then the file would be essentially the same as what it was before it was opened? Regardless of whatever internal representation the application used to hold the files content? AI doesn't do this for SVGs and more importantly, doesn't alert the user that the SVG file's internal structure has changed.

 

""the fix is straightforward" ... make SVG the native file format - just do it now? I assume you just wildly underestimate the complexity of Illustrator. A lot of the stuff it can do is just not supported by SVG as a file format."

 

Nowhere do I suggest that SVG be used as the native file format. The bug I've identified is where an extra <g>...</g> wrappers are added around existing groups -- the fix would be something like: "when exporting SVG and we have a group wrapper then don't add another wrapper", which is likely to reduce to a couple of lines of code.

 

"That pink object which you have designed, looks like a gradient mesh or even a freeform gradient. And obviously you want to use Illustrator, because it has this functionality. Then I do not understand why you insist that Illustrator uses SVG as its native file format, because SVG does not support these kinds of objects or attributes. You cannot save this into an SVG while preserving the editability. So, what do you want?"

 

Again nowhere have I insisted that Illustrator use SVG as its native file format. And yes, Illustrator was used to design that mesh, a job it does well, using it's own file format to do so. Once exported as SVG, that mesh was rasterised as an image and embedded in the SVG with a clipping path; again no problems. Once saved in this way we no longer need to edit the mesh although we may tweak the clipping path -- Illustrator would be fine for doing so, as it can open such an SVG and present it as a rasterised image with a clipping path, just that when it then saves the file it adds two extraneous <g> wrappers -- after a number of such edits these nested wrappers result in Illustrator silently misaligning the image and/or simply dropping it.

 

Adobe don't appear to care about what they (in an earlier discussion about extra group wrappers) described as a bug. I'm happy to move on without trying to use Illustrator as a graphics editor (apart from possibly for initial gradient/mesh creation).

 

Thanks.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines