Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Merging 2 images

trlinux
Beginner
775 Views
Hi there,
I have 2 images with alpha channels, one of them alpha value is equal to 255 and the other 128 booth of them same size, let me know how can i merge these images together. I wanna place transparent image on to full visible image(like background). Is there any easy way or ipp function for this ? Thanks ...
0 Kudos
1 Solution
Naveen_G_Intel
Employee
775 Views

Hi,

Probably ippiAlphaCompC function will match your requirement. This function is basically combines two images using constant alpha values.

Please refer to ippidemo.exe inside the IPP installation folder. Open an image, then select Process->Process by -> Logical& Alpha comp->Alpha Composition, then setect ippiAlphaCompC function and second image.

To get more information about this function refer to - http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch5/functn_AlphaCompC.html

Thanks,

Naveen Gv

View solution in original post

0 Kudos
5 Replies
Naveen_G_Intel
Employee
776 Views

Hi,

Probably ippiAlphaCompC function will match your requirement. This function is basically combines two images using constant alpha values.

Please refer to ippidemo.exe inside the IPP installation folder. Open an image, then select Process->Process by -> Logical& Alpha comp->Alpha Composition, then setect ippiAlphaCompC function and second image.

To get more information about this function refer to - http://software.intel.com/sites/products/documentation/hpc/ipp/ippi/ippi_ch5/functn_AlphaCompC.html

Thanks,

Naveen Gv

0 Kudos
trlinux
Beginner
775 Views
This is exactly , what i was looking for ... Thanks a lot sir ...
0 Kudos
marrisa
Beginner
775 Views

HI there

I have  encountered the same problem.I have tried to merge the image using this code which is from google:

namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        public static string FolderName = "c:/";

        private void button1_Click(object sender, EventArgs e)
        {
            string fileName1 = FolderName + "Sample1.tif";
            string fileName2 = FolderName + "Sample2.tif";
            string fileNameMerged = FolderName + "Merged.tif";

            REDocument doc1 = REFile.OpenDocumentFile(fileName1, new TIFDecoder());//use TIFDecoder open one tif file

            REDocument doc2 = REFile.OpenDocumentFile(fileName2, new TIFDecoder());//use TIFDecoder open another tif file

            BaseDocument docMerged = doc1.MergeDocument(doc2);//merge tiff image

            REFile.SaveDocumentFile((REDocument)docMerged, fileNameMerged, new TIFEncoder());//save new tif

But it display nothing.What's wrong with my code?I know there are many third  party program for image processing.So is there any powerful image program which supports to merge image directly.Thanks for any suggestion.

0 Kudos
Igor_A_Intel
Employee
775 Views

Hi Marrisa,

your question is not related to IPP, guess it's for another forum...

regards, Igor

0 Kudos
Daniel_F_2
Beginner
775 Views

This Image Processing Library integrates mature and reliable functions for developers to merge images. You are capable of merging two or more image files into one.

0 Kudos
Reply