2 added 204 characters in body
source | link

I have an image that I'm trying to pad some transparent border. But I get error:

"The specified padding value is not compatible with a 3-channel image."

data = Table[{45, 45, 45}, {20}, {25}];
p = Image[RawArray["Byte", data], "Byte", Rule[ColorSpace, Automatic],
    Rule[Interleaving, True]];

ImagePad[p, 10, Transparent]

What does this error mean and how to solve it?

Update

If test on the documentation figure, padding transparent works even it has a Automatic color space:

enter image description here

I have an image that I'm trying to pad some transparent border. But I get error:

"The specified padding value is not compatible with a 3-channel image."

data = Table[{45, 45, 45}, {20}, {25}];
p = Image[RawArray["Byte", data], "Byte", Rule[ColorSpace, Automatic],
    Rule[Interleaving, True]];

ImagePad[p, 10, Transparent]

What does this error mean and how to solve it?

I have an image that I'm trying to pad some transparent border. But I get error:

"The specified padding value is not compatible with a 3-channel image."

data = Table[{45, 45, 45}, {20}, {25}];
p = Image[RawArray["Byte", data], "Byte", Rule[ColorSpace, Automatic],
    Rule[Interleaving, True]];

ImagePad[p, 10, Transparent]

What does this error mean and how to solve it?

Update

If test on the documentation figure, padding transparent works even it has a Automatic color space:

enter image description here

1
source | link

Image padding problem with transparent

I have an image that I'm trying to pad some transparent border. But I get error:

"The specified padding value is not compatible with a 3-channel image."

data = Table[{45, 45, 45}, {20}, {25}];
p = Image[RawArray["Byte", data], "Byte", Rule[ColorSpace, Automatic],
    Rule[Interleaving, True]];

ImagePad[p, 10, Transparent]

What does this error mean and how to solve it?