I am trying to generate & Export[] Image with the below code, but as shown in the images I get some white border around my rectangle.
How could I export an images that stopes right at the edge of my Rectangle[] edges ?
c0 = {RGBColor[23/85, 29/255, 142/255], RGBColor[244/255, 1, 59/255],
RGBColor[1, 0, 32/85], RGBColor[18/85, 72/85, 197/255]}
Export[FileNameJoin[{Directory[], "DropBox", ToString[#] <> ".jpg"}],
Graphics[{EdgeForm[Thick],
White, Rectangle[{0, 0}, {160, 90}],
Flatten@({Flatten@(Table[
RandomChoice[{GrayLevel[.15], c0[[#]]}], {3}] & /@
Range[2, 4, 1]),
MapThread[
Function[{Xs, Ys},
Rectangle[{Xs, Ys}, {Xs + 16, Ys + 9}]],
{Flatten@Table[Range[0, 32, 16], {3}],
Flatten@(Table[#, {3}] & /@
Range[63, 81, 9])}]}\[Transpose]),
Black, Thick, Line[{{0, 63}, {160, 63}}]}, ImageSize -> 300]] & /@
Range[100]
png
files, you can useExport
with optionBackground->None
; but withjpg
images this trick does not work. $\endgroup$