• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Reduce the size of Image in Media object control

sillajose

Member
hi
If I attach a image with large size through media object attachment.
when I access the image from media object table to display it in media object control. I need to reduce the image size in media object control.
Anyone know how to reduce the size of image?...
 

Rauf

VIP Member
Hi Silla,

Please include your JDE version/ release in your signature.

We are in 8.12, 8.96.40 TR, and could not find any functionality to set the size to fit the image in MO Viewer.

If okay, you can proceed with the below code. You might need to alter the code to match your requirement.

Code:
-----------------------------------------------------------------------
     CONTROL:  BUTTON Load Image [HIDDEN]
     EVENT:  Button Clicked
-----------------------------------------------------------------------
     evt_CountField
0001 //
0002 VA frm_ImageRepository_CMDS = PO szImageRepository_CMDS
0003 VA frm_ImageOnclick_DESC2000 = "<div id=EEPicture><img width=150 height=180 src=""
0004 VA frm_szImageFile_DL01 = concat([FC Address Number],".jpg")
0005 VA frm_ImageOnclick_DESC2000 = concat([VA frm_ImageOnclick_DESC2000],[VA frm_ImageRepository_CMDS])
0006 VA frm_ImageOnclick_DESC2000 = concat([VA frm_ImageOnclick_DESC2000],[VA frm_szImageFile_DL01])
0007 VA frm_ImageOnclick_DESC2000 = concat([VA frm_ImageOnclick_DESC2000],'"')
0008 VA frm_ImageOnclick_DESC2000 = concat([VA frm_ImageOnclick_DESC2000]," </div>")
0009 //
0010 Add Segment(FC Text Block 42, VA frm_ImageOnclick_DESC2000, <Default,Default,0,Default>,  <Yes>, VA frm_iSegmentID_INT04)
where PO szImageRepository_CMDS will be public_shared_folder/empfoto/done/
You can read the path of image from the MO table and replace the path : public_shared_folder/empfoto/done/
 
Top