Home > Software engineering >  Cximage MixFrom function cannot merge tif file?
Cximage MixFrom function cannot merge tif file?

Time:09-26

Cximage MixFrom function cannot merge tif file?

CodePudding user response:

Baidu search relevant keywords,

CodePudding user response:

Can, I recently is in
use this functionCxImage t_image1, t_image2 t_image3;
Int t_h1 t_w1, t_h2 t_w2, t_h3, t_w3, t_bpp;
BRev=t_image1. Load (strFilePath1);

BRev=t_image2. Load (strFilePath2);

T_h1=t_image1. GetHeight ();
T_w1=t_image1. GetWidth ();
T_h2=t_image2. GetHeight ();
T_w2=t_image2. GetWidth ();
T_h3=t_h1 + t_h2;
T_w3=t_w1;
T_bpp=t_image1. GetBpp ();
If (t_bpp==1)
{
//black and white image
T_image3. Create (t_w3 t_h3, 16);
}
The else
{
//the black and white image
T_image3. Create (t_w3 t_h3, t_bpp);
}

T_image3. MixFrom (t_image2, 0, 0).
T_image3. MixFrom (t_image1, 0, t_h1);

If (t_bpp==1)
{
//black and white image
T_image3. Threshold (128);
}

//if you don't use the original size, use the set of fixed DPI
if( ! M_bIsOrgPDI)
{
T_image3. SetXDPI (m_struDPI. IXDPI);
T_image3. SetYDPI (m_struDPI. IYDPI);
}

BRev=t_image3. Save (strFilePath1 m_image. GetType ());

CodePudding user response:

In addition, I used to be combined use JPG/PNG images, just tested the tiff file, also can merge, hope useful to you
  • Related