Combine
Overview
The Combine Operation would combine the images in the pipeline into one image.
Configuration
Use "combine" as the type of the operation.
Keys in "config":
Key
Type
default value
Description
direction
string
"ttb"
There are 4 options: "ttb"
, "btt"
, "ltr"
, "rtl"
"ttb"
means "top to bottom""btt"
means "bottom to top""ltr"
means "left to right""rtl"
means "right to left"
horizontal_align
string
"center"
There are 3 options: "left"
, "center"
, "right"
This applies when "direction" is "ttb"
or "btt"
.
vertical_align
string
"center"
There are 3 options: "top"
, "center"
, "bottom"
This applies when "direction" is "ltr"
or "rtl"
.
Examples
Take this xopp file as an example.
Direction
ttb (top to bottom) btt (bottom to top) ltr (left to right) rtl (right to left)
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ttb"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "btt"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ltr"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "rtl"
}
},
{
"type" : "save"
}
]
}
Horizontal alignment
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ttb" ,
"horizontal_align" : "left"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ttb" ,
"horizontal_align" : "center"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ttb" ,
"horizontal_align" : "right"
}
},
{
"type" : "save"
}
]
}
Vertical alignment
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ltr" ,
"vertical_align" : "top"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ltr" ,
"vertical_align" : "center"
}
},
{
"type" : "save"
}
]
}
config.json {
"pipeline" : [
{
"type" : "load" ,
"config" : {
"paper_background_preserved" : true ,
"trim" : true
}
},
{
"type" : "combine" ,
"config" : {
"direction" : "ltr" ,
"vertical_align" : "bottom"
}
},
{
"type" : "save"
}
]
}
June 29, 2024
GitHub