Jump to content
You must now use your email address to sign in [click for more info] ×

white background after export


Recommended Posts

The SVG background will be transparent but until you place it over something other than white it will look like it has a white background.

What are you trying to do?

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

But the background of his SVG is not transparent. If you open the SVG in Photo you'll see a large transparent rectangle with his symbol in the middle, and the black parts of the symbol are surrounded by white. If you place a fill layer behind it, you'll see something like this:
image.png.38cc4cfbe37c7fa04474383a8f008109.png

where, I believe, Mr Lucky was not expecting the white areas. The white part was not present in the original .afphoto file:
image.png.a9836fe6c6a74622088f2acb8d1c8438.png

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 17.7, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sonoma 14.7

Link to comment
Share on other sites

Its not clear whether the rectangle is there as part of the image or there as an example, after all there are neater ways to make that image and why would you cut a copyright symbol in half? doesn't really make much sense at the moment, this is why I have asked what he is trying to do.

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

36 minutes ago, JimmyJack said:

It's because the rectangle is set to Erase which is forcing rasterization and placing a white background on export ;).

Not so much. I've attached an example that I created, and did not set any special blend mode, just left it at Normal. The screenshot is how Paintshop Pro sees it. So far I'm finding the Affinity Photo is the only app that maintains the transparency. The image on the left with the blue background, I intentionally miss-cropped it to see if a white background is applied. Also for my example I used a gradient fill for the rectangle, Clipped it to the copyright text.

 

svg transp.jpg

svg test file.afphoto

Affinity Photo 2.5..; Affinity Designer 2.5..; Affinity Publisher 2.5..; Affinity2 Beta versions. Affinity Photo,Designer 1.10.6.1605 Win10 Home Version:21H2, Build: 19044.1766: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz, 3301 Mhz, 6 Core(s), 12 Logical Processor(s);32GB Ram, Nvidia GTX 3070, 3-Internal HDD (1 Crucial MX5000 1TB, 1-Crucial MX5000 500GB, 1-WD 1 TB), 4 External HDD

Link to comment
Share on other sites

@Ron P. I'm not sure what your point is. In Affinity the Erase blend mode causes rasterization. If you don't use it you get transparency, which is expected. Which is what you got.

The white edges in your left example are a different issue most likely do to a canvas size/crop in Designer that doesn't have whole pixel dimensions. So that also is expected.
A pita, but expected :D.

Link to comment
Share on other sites

I was trying to see why the OP was having the problem. Using PSP was probably the wrong program to use, as it does not see it as with a transparent background. I just tried CorelDraw, and the transparency is maintained. PhotoPaint rejects SVG files. Of course I understand that for an object/image to be viewed like on the web or in a photo viewing app, there must be some background color, commonly white.

Affinity Photo 2.5..; Affinity Designer 2.5..; Affinity Publisher 2.5..; Affinity2 Beta versions. Affinity Photo,Designer 1.10.6.1605 Win10 Home Version:21H2, Build: 19044.1766: Intel(R) Core(TM) i7-5820K CPU @ 3.30GHz, 3301 Mhz, 6 Core(s), 12 Logical Processor(s);32GB Ram, Nvidia GTX 3070, 3-Internal HDD (1 Crucial MX5000 1TB, 1-Crucial MX5000 500GB, 1-WD 1 TB), 4 External HDD

Link to comment
Share on other sites

All you need to do is convert the text to curves and subtract the rectangle... simples

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

3 hours ago, firstdefence said:

The SVG background will be transparent but until you place it over something other than white it will look like it has a white background.

What are you trying to do?

I'm trying to create some text for a logo which is "cut through" with a line or other shapes to expose whatever background is underneath. 

2 hours ago, firstdefence said:

Its not clear whether the rectangle is there as part of the image or there as an example, after all there are neater ways to make that image and why would you cut a copyright symbol in half? doesn't really make much sense at the moment, this is why I have asked what he is trying to do.

 

I just used a copyright symbol as an example, same issue happens whatever the letter is. The logo I'm working in is confidential so I just used an example of the ©

What are the neater ways of doing this? (I got this method. from a tutorial post on here)

2 hours ago, JimmyJack said:

It's because the rectangle is set to Erase which is forcing rasterization and placing a white background on export ;).

Even if it is forced to rasterise, why would that need to affect transparency

 

1 hour ago, firstdefence said:

All you need to do is convert the text to curves and subtract the rectangle... simples

 

Same issue when converted to curves.

Besides at this stage of the project it's best to keep to text as the font may need to change.

Link to comment
Share on other sites

Do you Affinity Designer?

If so you can create a Compound shape Layer > Create Compound This will export with Transparency and the text in the afdesign file will remain as text.
Logo compound shape.afdesign

In Affinity Photo I don't think its possible to mask out parts of text and still keep that text editable, you would have to convert the text to curves, select all the letters and Geometry Add them together to create a single curve and then Geometry subtract whatever shape you wanted from the text curve.

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

Well if the OP would have looked at his intial generated SVG file's code (via a text editor), he probably would have seen that no plain vector curves (paths) have been used for that and an image was placed instead inside. Aka ...

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 607 900" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
    <g transform="matrix(0.363085,0,0,0.396985,72.6083,181.508)">
        <g transform="matrix(2.75418,-0,-0,2.51899,-199.976,-457.215)">
            <use xlink:href="#_Image1" x="114.917" y="295.37" width="368.408px" height="368.408px" transform="matrix(0.998396,0,0,0.998396,0,0)"/>
        </g>
    </g>
    <defs>
        <image id="_Image1" width="369px" height="369px" xlink:href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAUDBAQEAwUEBAQFBQUGBwwIBwcHBw8LCwkMEQ8SEhEPERETFhwXExQaFRERGCEYGh0dHx8fExciJCIeJBweHx7/2wBDAQUFBQcGBw4ICA4eFBEUHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh4eHh7/wAARCAFxAXEDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD7LoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAz9f13RfD9ib7XdXsNKtV6zXlwkKfmxAoA8Z8YftX/B3QGkitdWvtenTgpploWXP+/IUQj3BNAHkPiv9t+9YtH4V8C28QH3ZtSuzJn6xxhcf99mgDzXxB+1t8Z9U3C11bTNHVu1jp6HH0Mu8/rQBwuqfGv4t6kWNz8RfEq7uogv3gH5RlRQBzN/4s8Vag++/wDE2tXbHvNfSuf1agDMmvbyb/XXc8n+/IT/ADoASG5uYf8AU3Esf+45H8qANCz8S+I7Nw9nr+q27Do0V5IhH5GgDo9M+MPxV07H2X4i+KAo6LJqcsij8GYigDtvD/7VXxq0rasviO21SNeiX1hE35siqx/
                                                                     
                                ... after other hundreds lines of bitmap related data ...
                                                                     
AKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgCDUf8Ajxn/ANw0AfG3xx/5C8n1NAHzn4x/joAz/B/VKAPe/hP/AMhi3oA+2/CX/IAtv92gDWoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgAoAKACgD/2Q=="/>
    </defs>
</svg>
                                              
                                                                

... Instead of something plain vector based like this ...

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg width="100%" height="100%" viewBox="0 0 1280 800" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
    <path d="M447.481,368C447.446,369.299 447.429,370.603 447.429,371.911C447.429,395.515 452.559,415.843 462.819,432.896C473.08,449.948 487.916,462.545 507.329,470.686C526.742,478.827 548.25,482.897 571.854,482.897C597.096,482.897 618.243,478.658 635.295,470.18C652.348,461.702 665.113,451.393 673.591,439.254L699.748,439.254C694.834,449.37 686.404,459.679 674.458,470.18C662.512,480.681 648.301,488.991 631.827,495.108C615.352,501.226 595.506,504.285 572.288,504.285C550.9,504.285 531.174,501.539 513.11,496.048C495.046,490.556 479.655,482.295 466.938,471.264C454.221,460.233 444.635,447.54 438.18,433.185C430.087,414.976 426.041,395.322 426.041,374.224C426.041,372.14 426.079,370.066 426.154,368L447.481,368ZM688.824,368C684.29,384.407 675.744,399.536 663.186,413.387C645.652,432.848 626.48,442.578 605.67,442.578C599.022,442.578 593.651,441.566 589.557,439.543C585.462,437.52 582.452,434.63 580.525,430.873C579.272,428.464 578.357,424.321 577.779,418.444C571.517,425.67 564.508,431.475 556.753,435.858C548.997,440.242 541.217,442.434 533.414,442.434C524.839,442.434 516.506,439.929 508.413,434.919C500.32,429.909 493.745,422.202 488.687,411.797C483.629,401.392 481.1,389.975 481.1,377.547C481.1,374.366 481.27,371.183 481.608,368L508.711,368C508.127,371.916 507.835,375.676 507.835,379.282C507.835,392.48 510.966,402.741 517.228,410.063C523.491,417.385 530.668,421.046 538.761,421.046C544.156,421.046 549.84,419.432 555.813,416.204C561.786,412.977 567.495,408.184 572.938,401.825C578.381,395.467 582.837,387.398 586.305,377.62C587.442,374.416 588.392,371.209 589.156,368L613.688,368L609.716,386.507C606.826,399.995 605.381,407.461 605.381,408.907C605.381,411.508 606.369,413.748 608.344,415.626C610.319,417.505 612.703,418.444 615.497,418.444C620.603,418.444 627.299,415.506 635.584,409.629C646.567,401.922 655.262,391.589 661.669,378.631C663.406,375.118 664.908,371.574 666.174,368L688.824,368ZM427.804,350C429.993,335.206 434.223,320.881 440.492,307.025C452.246,280.917 468.937,260.926 490.566,247.052C512.195,233.179 538.424,226.243 569.253,226.243C593.146,226.243 614.606,231.132 633.633,240.911C652.661,250.689 667.666,265.261 678.649,284.626C687.994,301.293 692.667,319.405 692.667,338.963C692.667,342.698 692.491,346.377 692.14,350L670.526,350C671.028,346.208 671.279,342.385 671.279,338.529C671.279,322.44 667.16,307.411 658.923,293.441C650.686,279.471 638.402,268.296 622.072,259.914C605.742,251.532 587.702,247.342 567.952,247.342C545.408,247.342 524.815,252.616 506.173,263.166C487.531,273.715 473.08,288.841 462.819,308.543C455.954,321.726 451.385,335.545 449.114,350L427.804,350ZM485.324,350C487.211,343.844 489.728,337.684 492.878,331.52C500.73,316.154 510.484,304.617 522.142,296.909C533.799,289.202 545.119,285.348 556.102,285.348C564.484,285.348 572.48,287.54 580.091,291.924C587.702,296.307 594.254,302.979 599.745,311.939L604.658,289.539L630.526,289.539L617.551,350L591.489,350C591.501,349.404 591.508,348.808 591.508,348.211C591.508,335.109 588.256,324.945 581.753,317.719C575.25,310.494 567.326,306.881 557.981,306.881C551.815,306.881 546.01,308.446 540.567,311.577C535.124,314.708 529.849,319.742 524.743,326.679C519.978,333.152 516.094,340.926 513.091,350L485.324,350Z" style="fill-rule:nonzero;"/>
</svg>

 

To get an overall howto idea look here ...

... it's similar for AD.

When doing it instead in plain SVG code (the way I would do) the following about obj transparency in SVG is a good short read ...

 

Coded in SVG via two rects as a clip-path, for text used just the "@" sign ...

at_sign.jpg.9a5c24a061708d501b000fda40f6f4b3.jpg

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
  <defs>
    <clipPath id="cut-off-middle">
      <rect x="0" y="0" width="300" height="25" />
      <rect x="0" y="30" width="300" height="25" />
    </clipPath>
  </defs>
  <style>
    .heavy { font: bold 60px sans-serif; }
  </style>

  <text x="50" y="50" class="heavy" clip-path="url(#cut-off-middle)">@</text>
</svg>

 

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

@Mr Lucky
PNG is a raster based file with transparency capabilities, SVG is a vector based file also with transparency capabilities but the addition of the Blend Mode: Erase on the rectangle triggers rasterisation on export and removes transparency capabilities, like it considers it a JPG not a PNG with transparency image.

Using Boolean operations on curves maintains the vector status, so, converting the text to curves keeps the transparency option intact.

 

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

27 minutes ago, Mr Lucky said:

Except that it isn't working for me, even if I convert the text to curves, I still get the white background with SVG

Having what appears to be a white background doesn't necessarily mean it isn't transparent in the area's you want transparency. 

How are you checking the SVG doesn't have transparency?

Simple test, create a new afphoto document and add an orange fill layer. Layer > New Fill Layer This will be used to drag your svg into. If it has transparency you will definitely see the orange, if not it will obviously show white area's where transparency is expected.

Just to be clear, you only have Affinity Photo?

The only way I can see to get what you want in Affinity Photo is to convert the text to curves and apply boolean(Geometry) operations on the resultant curve.

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

3 minutes ago, haakoo said:

You need to geometry>substract the rectangle from the copyright text.
And the document background should be transparent in the first place or you need to export selection without background

 

linethroughcut2.svg

The © or @ symbol are just for demo purposes,

 What if you have a word, which is what I think Lucky wants, if you geometry subtract a rectangle from a word it will leave the first letter chopped and the rest will disappear.

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

3 minutes ago, haakoo said:

Oke,

Text>convert to curves>ungroup>Geometry Add
Place rectangle over the shape
Select both shape(former text) and rectangle>Geometry Substract

Correct, go to the top of the class and you get a gold star ;)

iMac 27" 2019 Sequoia 15.0 (24A335), iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

13 minutes ago, firstdefence said:

How are you checking the SVG doesn't have transparency?

I open the SVG in Photo (or Designer)

14 minutes ago, firstdefence said:

Simple test, create a new afphoto document and add an orange fill layer. Layer > New Fill Layer This will be used to drag your svg into. If it has transparency you will definitely see the orange, if not it will obviously show white area's where transparency is expected.

It is definitely a white area (plus has lines on it I have made a different thread about) 

 

2124952139_Screenshot2019-02-10at15_25_06.thumb.png.cb4daeeb18d868d0cfcd07df8f69811e.png

 

14 minutes ago, firstdefence said:

Just to be clear, you only have Affinity Photo?

And designer. I'm getting the same issue with both.

Link to comment
Share on other sites

44 minutes ago, Mr Lucky said:

Except that it isn't working for me, even if I convert the text to curves, I still get the white background with SVG

Did you also changed the rects erase blend mode to normal? When both are vectors/curves and you select them and make a subtract, you are just leaved with curves/paths. Now if you save that as SVG afterwards make sure to use an app which can show up transparent backgrounds, not all do.

For example Firefox etc. will use as default a white background for show up, apps like GC will show the transparency ...

test1.jpg.8db216b8552072e0d6c7015519707cd8.jpg

Also when exporting as SVG set the more option to NO rasterization should occur then.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.