joshbirnholz/cardconjurer

1/8th Extended Artwork Border Margin doesnt fit

Closed this issue · 5 comments

The 1/8 Inch Margin Border for at least the following doesnt fit:

  • Box Topper Extension (Short), No Mask
  • Box Topper Extension, No Mask
    There seem to be ~1px missing.

It looks like it's only part of the image that's affected, but it's on both sides, which matches what I was seeing. Making a cursory attempt to fix the images and will try them out.

I inspected all the borders in img/frames/margins and indeed, only boxTopperShortBorderExtension.png and boxTopperBorderExtension.png had the defect. On both sides of the image there was a section of missing pixels that would let the background layer bleed through.

Screenshot from 2024-03-01 17-15-44

I simply copied the next line of pixels over, pasted in place, then shifted by 1 pixel to keep the angle of the gradient, and rexported.

Now, I'm not very knowledgeable about images, but this was being really weird if I just imported the existing images and fixed them in GIMP. On export, the problem would always return. I ended up having to copy the contents into a new image to get it to actually export. So something was definitely defective with the image files themselves not so much the pixels in them.

I've submitted a pull request for my fixed images, and while I'm certain there's more optimizations that can be done, at least this fixes it.

It does look like my fix still has some potential issues:

image

Which might explain why these were like this. But on the other hand, without this, it was a transparent gap instead.

Oh, it might be a scaling issue...

I only now realized, that the original files are only 1632x2220. But, the exported images from CardConjurerer are 2187x2975. That difference and the resulting scaling seems like it could definitely explain what's going on here. And sure enough if I scale the files, there's a half-transparent row that seems to be the cause here.

And I was able to solve the above by pre-scaling the images, correcting the incorrect columns, and then exporting that. So far this seems to work perfectly. I've updated the PR with the new images and a more detailed explanation of the fix.