Skip to content

Commit

Permalink
Improvements & Linux fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
randaz81 committed Dec 30, 2024
1 parent 38dbd6d commit e6242dd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/libYARP_sig/src/yarp/sig/ImageNetworkHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ class ImageNetworkHeader
height = image.height();
paramBlobLen = image.getRawImageSize();
}

void setToImage(FlexImage& image)
{
image.setPixelCode(id);
//setPixelSize() is already set by setPixelCode
image.setQuantum(quantum);
image.resize(width, height);
}
};
YARP_END_PACK

Expand Down
8 changes: 8 additions & 0 deletions src/libYARP_sig/src/yarp/sig/LayeredImage.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,20 @@ class YARP_sig_API yarp::sig::ImageLayer
{
bool enable = true;
int value=0;

//default constructor
colorkey_s() = default;
} colorkey;

struct alpha_s
{
bool enable = true;
float value=1.0;

//default constructor
alpha_s() = default;
} alpha;

bool can_be_compressed = true;
int offset_x=0;
int offset_y=0;
Expand Down

0 comments on commit e6242dd

Please sign in to comment.