10-23-2025 12:33 PM
I've been trying to look into IMAQ Rotate's "Replace Value" and "Color Replace Value" to rotate an image, and then replace the default black background that is generated where pixels are no longer present with transparent pixels. Is there any way to do this? I've been looking around, and my first try was changing the "Color Replace Value" to have an Alpha of 255, but that doesn't seem to have done anything. I tried using a bitmap to replace specific values with transparency (Google search suggested it) to no avail. Am I missing something? Which Image Formats allow transparency (I've tried RGB32, U8, and U16). Any help would be much appreciated, thanks!
11-12-2025 05:12 AM
Hi EthanHenry,
Unfortunately, IMAQ does not support transparent pixels. Could you share a few more details about your project and what you’re trying to achieve? With a bit more context, we may be able to find a suitable workaround.
11-12-2025 10:54 AM
Darn, my main use case was using edge detection, it works great on the image but the camera itself was rotated by about 5 degrees. I tried rotating the image -5 degrees, and that gets it pretty square, except now the edge detection (which was over the whole image) picks up the black border. I figured out how to rotate the ROI and keep it centered, but was hoping there was an easier way.
A Second use case that I found a work around for, though would be made simpler with transparent pixels, is stitching multiple images together. I got it to work by then creating a mask image where the borders were and including that in the Image to Image input, but being able to replace the black borders with transparent pixels would just remove a step, potentially speeding up the processing. All in all, a solution isn't really required, however it would make life a loooooooooot easier.