Hi Megumi
As the #PRIM_WEB.Signature do not have a way to control transparency, it by defaults returns a PNG file with transparency.
You will need either to request an enhancement to be able to control if you want transparency or not
or you will need to consume a restful api to convert from PNG to JPG for example and to loss the transparency in that step.
Notice that files JPG and PNG are totally different inside. you need to convert them not just to rename them.
Also. Why do you need the file not to have transparency? For example, if I want to be able to show the signature
with a background in an Image, I can control de background of the image been displayed using style. That dont
stop the image to have a transparent background, but now the image covers whatever is behind anyway.
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<MaterialDesignBlue>)
Define_Com Class(#PRIM_WEB.Signature) Name(#Signature) DisplayPosition(1) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Height(664) Width(669) Top(44) Left(4) Hint('Sign here') ThemeDrawStyle('LightTitle')
Define_Com Class(#PRIM_MD.RaisedButton) Name(#Button) Caption('Display as Image') DisplayPosition(2) Left(724) Parent(#COM_OWNER) TabPosition(2) ThemeDrawStyle('MediumTitle+Rounded') Top(56) Width(221)
Define_Com Class(#PRIM_IMAG) Name(#Image) DisplayPosition(3) Image(#xImageImage32) Left(784) Parent(#COM_OWNER) TabPosition(3) TabStop(False) Top(256) Height(193) Width(217) ThemeDrawStyle('LightAccent')
Define_Com Class(#PRIM_MD.Label) Name(#Text) DisplayPosition(4) Left(728) Parent(#COM_OWNER) TabPosition(4) Top(136) Caption('alalala alalal alalal alalala alalala alalala alalal alalal alalala alalala alalala alalal alalal alalala alalala alalala alalal alalal alalala alalala alalala alalal alalal alalala alalala alalala alalal alalal alalala alalala ') Height(265) Width(209) WordWrap(True)
Define_Com Class(#PRIM_MD.Label) Name(#Subtitle1) DisplayPosition(5) Left(4) Parent(#COM_OWNER) TabPosition(5) Top(6) Width(277) Caption('Sign here')
Evtroutine Handling(#Button.Click)
* Image captured is a png with transparent
#Image.Image <= #SYS_APPLN.CreateBitmap( #Signature.Blob )
#Text.Caption := #Signature.Blob
* #sys_web.Navigate Url(#Signature.Blob) Target(New)
Endroutine
End_Com