fritzing / fritzing-app

Fritzing desktop application
http://fritzing.org
Other
3.98k stars 826 forks source link

SVG export problem - image/jpeg;base64 #4126

Open KotaroHarada opened 7 months ago

KotaroHarada commented 7 months ago

Current Behaviour

Stepper motor driver DRV 8825 not loading correctly when I export as SVG (Schematic). As BreadBoard is visivle but with white background.

![image](https://github.com/fritzing/fritzing-app/assets/48774805/bf9a6824-0759-4d4f-a778-73c019b0d0f9) ![image](https://github.com/fritzing/fritzing-app/assets/48774805/ed08ad69-bdc5-4d0b-a4e6-d9f392b32ee1) **Build:Version 0.9.10 (bCD-2134-0-40d23c29 2022-07-01) 64 [Qt 5.15.2]** **Steps to reproduce:** - Step 1: add drv8825 - Step 2: Export to SVG ## Expected Behaviour DRV 8825 correctly exported as SVG
KjellMorgenstern commented 7 months ago

Still reproducable in Fritzing 1.0.2.

Intersting, the DRV8825 part contains a photograph of the board as BASE64 encoded jpeg. That jpeg is not rendered by Fritzing, but still included in the SVG export.

A quick fix for the part is to remove the image tag: <image enable-background="new " href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEDzgPOAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAE...

Possible fixes:

  1. Fix parts that currently contain embedded images, as there are probably no parts that intentionally do this.
  2. Warn on embedded images
  3. Turn it into a feature. We could at least allow embedded images that have a transparency layer.
KjellMorgenstern commented 7 months ago

Created https://github.com/fritzing/fritzing-parts/issues/392 for the 8825 part itself.

KotaroHarada commented 7 months ago

Still reproducable in Fritzing 1.0.2.

Intersting, the DRV8825 part contains a photograph of the board as BASE64 encoded jpeg. That jpeg is not rendered by Fritzing, but still included in the SVG export.

A quick fix for the part is to remove the image tag: <image enable-background="new " href="data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEDzgPOAAD/7AARRHVja3kAAQAEAAAAHgAA/+4AIUFkb2JlAGTAAAAAAQMAE...

Possible fixes:

  1. Fix parts that currently contain embedded images, as there are probably no parts that intentionally do this.
  2. Warn on embedded images
  3. Turn it into a feature. We could at least allow embedded images that have a transparency layer.

Can u tell me where i can change this? Im newbie and never fix anything like this in this program. I need another program to do this or something?

KjellMorgenstern commented 6 months ago

Someone else tried a fix on the part, maybe this version works better: https://forum.fritzing.org/t/pololu-stepper-driver-drv8825-working-pins-v3/1460/2

Please note that I have created fritzing/fritzing-parts#392 for the 8825 part itself. This issue is about Fritzing to better deal with errors in parts.