Help me understand the large margin when rotating a bitmap


#1

This could be a rotation bug, but it’s most likely me not understanding what’s happening so I can fix it. Either way, it’s a huge pain when trying to place a PDF/SVG raster files in the GUI. The large image margin really limits things as they tend to fall outside the cut area.

When I import a SVG or PDF containing both a bitmap and vector element, there is a large margin around the bitmap that I don’t understand. The second thing I don’t understand is how/why the margin expands the way it does when rotated in the GUI and why the SVG/PDF bitmap margins behave differently when rotated than a PNG.

_****EDITED to add: OK, I figured out that the wide margin I talk about just below does NOT translate into wide margins when loaded into the GUI. I thought they were related, but I don’t think so now. I loaded several PDFs and embedded SVGs that showed the same wide space around the image in preview, but wasn’t there when uploaded. However, the old issue I’ve had of PDFs coming in with repeated pattern issues is still there. PDFs rarely work as expected for me and never have. :confused:

A SVG with an embedded bitmap is on the left and a PDF is on the right. This one came in without the weird margin issue and it rotates fine, but as you can see, the image is repeated in a weird pattern and it’s unusable. This has been an issue since the very beginning for me. Of note, there is no clipping path in this. It is simply a vector cut line on top of a bitmap.

(See updated info above. Don’t think this is the issue.^^ ) I know the first part is on my Corel design program end as when I save a PDF or SVG with an embedded bitmap, I can see the larger margin in the thumbnail. Why does the program add the margin and is there a way to prevent it? I’m 100% sure there are no stray nodes or other unseen elements floating around to account for the margin. When I save the same raster image as a PNG, it saves and uploads with a normal margin. (I know this isn’t a GF support issue, but it’s hard to separate the question from the one below.)

The second issue is how the margins don’t stay consistent when rotated in the GUI. I don’t understand why, for example, the margin at the front of the image is .5 wide when facing one direction, but is .75 when it’s rotated 90 degrees. (It’s hard for me to explain. Hopefully the pics make sense.) I’m imagine there’s some simple mathematical/technical explanation for it, but I don’t get it. I also don’t understand why the PDF/SVG bitmap margin acts differently than the PNG margins?
Sorry so pic heavy…

The PDF file thumbnail showing the wide margin. Notice the image was rotated before saving in my program.


The PNG file is on the left, the PDF one on the right. Notice the different margins.


The margin proportions change depending on which way the PDF file is rotated.


PNG on left/PDF on right showing margin difference. (BTW, this is the orientation of the file when first uploaded.) You’d think the margins of the PNG version would stay consistently smaller, but see the next set of pics…


__
The margin of the PNG increased when rotated this way, and the PDF version actually decreased?


#2

Hmm.

I just really wanted to take a picture with my finger in it for you, since out of all of these pictures, you didn’t do it once! :slight_smile:

(That’s an illustrator SVG with embedded image and a cutline)

I can maybe figure some differences between the PNG and PDF, because of the way that PDFs act more as a container for various elements but the SVG is weird. But weirder is how the margins change.

Do you have an “outline mode” in Corel? I don’t know what it would be called. It lets you see all of the paths without strokes or fills? That should show you the whole area of the embedded images.


#3

When you rotate a bitmap it does need to get bigger because they are always rectangles aligned with the screen. That is why the SVG element can contain a transform, so that the un-rotated bitmap is stored in the file and then drawn rotated. Otherwise if the bitmap was stored rotated it would be bigger and presumably need a clipping mask or transparency.

I expect this is why the GFUI is getting the boundary wrong. It is including the transparent area of the bitmap where the original corners are.


#4

I’ve been trying to show restraint! I did have to sneak one finger in on a post yesterday though LOL.

Yeah this is what has me confused the most. I would understand if the differences were consistent, but they’re not. PDFs in particular have been my arch nemesis and I have a lot of trouble getting them to work well consistently. They are so much easier for alignment though so I’m trying to sort it all out.

In Corel what you’re talking about is a “wire frame” mode. There is nothing in the file that I can see that accounts for the extra border. It happens consistently across other files too and not specific to just this one.


#5

Thanks for the help palmercr. I understand how/why the bounding box has to increase to stay square when rotated, I just don’t get why the proportions don’t stay consistent as it rotates and why the margins are so wide to begin with. I can take a png version that has a “normal” margin that follows the edges of the bitmap, drop it into a new, clean page, save as embedded SVG or PDF and the margins are huge for some reason.


#6

I’m so sorry for the delay in my response.

Thanks for letting us know about this! We’re seeing this, too, and we’re looking into it.

If you run into anything else, please post a new topic.


#7