offer flatten transparency as an option

Bug #951816 reported by Pablo Rodríguez
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
Inkscape
Confirmed
Wishlist
Unassigned

Bug Description

Wouldn't it be possible that inkscape had a feature that flattened transparencies in SVG to solid color (without changing the color)?

Many thanks for your help,

Pablo

jazzynico (jazzynico)
tags: added: color
Revision history for this message
jazzynico (jazzynico) wrote :

You can easily flatten transparency for an object by using the Dropper tool:
1. Select the dropper.
2. Uncheck Pick.
3. Click on the object to flatten.

But it's not very handy if you need to flatten a whole drawing (before exporting to bitmap, for example).

Revision history for this message
su_v (suv-lp) wrote :

> Wouldn't it be possible that inkscape had a feature that flattened transparencies in SVG

Besides JazzyNico's hint (basic feature already exists within the dropper tool context): Why would one want flatten for example the attached SVG file while keeping the SVG file format and the content as vector? (Note: the checkerboard pattern is only to visualize the effect of using combinations of object-, fill- and stroke-opacity - it's on a separate layer and can be hidden easily. The task to flatten transparency remains complex with or without the pattern).

Flattening the transparency would require to duplicate all stroked objects, convert the strokes to paths, and create complex path intersections to -in the end- have each region of the overlapping semi-transparent regions as individual closed paths which can then have a solid fill color matching the result of the composited semi-transparent regions.

Note that this would also require to convert the text to path and split it into hundreds or more individual paths.

I don't see a useful scenario for such complex transformations while keeping the file format as SVG (the different types and levels of opacity are inherent to the SVG specification).

Possibly you are requesting this for a specific (narrow) use case / task: export to vector formats which do not support transparency at all (PostScript)?

Revision history for this message
Pablo Rodríguez (ousia) wrote :

I wanted this to convert to formats that don't have transparency as an option (not PostScript, but PDF in a context where transparency isn't available).. In such cases, only to options are available: to remove transparency or to flatten it (converting it to solid colors).

This feature is useful in those cases, not to have an SVG file without transparency. Adobe Illustrator has a a similar option.

If it's so hard to implement, maybe closing the issue as invalid is the fix for my report ;-).

Thanks for your help,

Pablo

Revision history for this message
Mikhail Titov (mtitov) wrote :

EMF is a good example, though perhaps not that popular. I create a plot in R with transparency, save it in PDF, and use inkscape to convert that into EMF. I loose transparency.

jazzynico (jazzynico)
Changed in inkscape:
importance: Undecided → Wishlist
status: New → Confirmed
tags: added: exporting preferences
Revision history for this message
sgmanohar (sgmanohar) wrote :

I think this is an essential feature. MS word only supports EMF, and putting figures into word documents had gotta be one of the most common tasks. Copying and pasting an image with transparency into wordprocessor will convert the image to bitmap, which is unacceptable for most purposes.

Having a routing that will break up the transparency into segments with solid fill is certainly the best way to manage this, and it's not really possible to do this manually for even relatively simple figures. Should be really straightforward for a computer to calculate how to do this though?

Thanks
Sanjay

Revision history for this message
su_v (suv-lp) wrote :

Same request for PDF export:
- Bug #1266902 “Option to remove transparency for PDF export”
  <https://bugs.launchpad.net/inkscape/+bug/1266902>

Revision history for this message
m anenbu (manenbu) wrote :

Indeed a very important feature request.

What I would expect it to do is to take the two objects that you can see in the attached file, and split them into three objects.
The three objects will no transparency at all, and their fill color will remain similar (and adjusted for the loss of transparency).

Revision history for this message
David (droe) wrote :

There's another important use case in which this feature would be very helpful: some print drivers (e.g. CUPS) convert PDF to PostScrip (PS) before printing. As PS does not support transparency, the whole page is rasterized which looks poorly. This is especially problematic when printing documents with text and inserted graphics. A transparency flattening option when exporting to PDF could prevent this problem. This problem does not seem to be too uncommon as the following links show:

https://askubuntu.com/questions/128595/flattening-pdf-transparency
http://superuser.com/questions/550155/inkscape-transparency-when-exporting-pdf
http://mathematica.stackexchange.com/questions/29120/how-do-i-flatten-transparency-on-a-graphics-for-conversion-to-eps-or-similar

If the last link can be believed, Inkscape would be the onyl free graphics software capable of doing this. Apparently only Adobe products can do it so far.

Revision history for this message
Eryoka (cozart) wrote :

I'm using emf files when creating documents with publisher, and I have the same issue.
is this flattening transparency feature avaible since the first message? thank you

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.