Home » U++ Library support » Look and Chameleon Technology » BUG? ImageOp's not HotSpot aware
BUG? ImageOp's not HotSpot aware [message #30188] |
Tue, 14 December 2010 11:22 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
some ImageOp functions, i.e. Colorize, will ignore the hotspots when copying the image data.
is it meant like that?
use case is:
i am playing with style and colorizing current style CtrlsImg::iml() using the Colorize funtction (and a helper) works pretty fine, but hotspots are gone..
any hints on that?
same case applys to
ColorMask
AssignAplha
Equalight
Grayscale
Colorize
Contrast
MirrorHorz
MirrorVert
these are functions that dont change size of the image, and could keep the hotspots
[Updated on: Tue, 14 December 2010 11:23] Report message to a moderator
|
|
|
|
|
|
Re: BUG? ImageOp's not HotSpot aware [message #31832 is a reply to message #30357] |
Wed, 30 March 2011 10:58 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
swapping the hotspots when mirroring is not so good, since it generates a 'negative' Rectangle.
i'd vote for simply keep the hotspots where they are, since it's actually a 'visual' mirroring, not a functional.
color mask is same..
so here are the changes left
@@ -138,6 +138,8 @@ Image ColorMask(const Image& src, Color key)
*t++ = *s;
s++;
}
+ ib.SetHotSpot(src.GetHotSpot());
+ ib.Set2ndSpot(src.Get2ndSpot());
return ib;
}
@@ -586,6 +588,8 @@ Image MirrorHorz(const Image& img)
e--;
}
}
+ ib.SetHotSpot(img.GetHotSpot());
+ ib.Set2ndSpot(img.Get2ndSpot());
return ib;
}
@@ -604,6 +608,8 @@ Image MirrorVert(const Image& img)
e++;
}
}
+ ib.SetHotSpot(img.GetHotSpot());
+ ib.Set2ndSpot(img.Get2ndSpot());
return ib;
}
|
|
|
|
|
|
Re: BUG? ImageOp's not HotSpot aware [message #32015 is a reply to message #32004] |
Sun, 17 April 2011 14:32 |
|
kohait00
Messages: 939 Registered: July 2009 Location: Germany
|
Experienced Contributor |
|
|
sorry i meant ColorMask, where they can be kept as is as well.
i am not that much in that stuff, maybe its good though i can see from the mere user perspective..
my point, so far i could grasp it, is this: as long as the funciton only changes the value of the pixels themselves (or only copies them) hotspots can be kept. the easy solution could be: as soon as the dimensions of an image are changed, hotspot info is gone. mirroring is actually sth in beween.
in ImageOp.cpp, there now these functions, which dont handle hotspot (AFAIK):
Copy, Sharpen, Etched, RotateClockwise, anticlockwise, rotate180, Rotate, Magnify..DstSrc, DstSrcOp, Over, OverStraighOpaque, Crop.
i agree that it cant be solved the perfect way, for both mouse cursor and image stretching.
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Dec 14 13:38:33 CET 2024
Total time taken to generate the page: 0.02707 seconds
|