<htmlb:inputField id = "IMAGE" visible = "FALSE" value = "//MODEL/IMAGE_DATA" />
var image = canvas.toDataURL("image/jpeg");
var modelImage = document.getElementById("IMAGE");
var imageData = image.split(',');
modelImage.value = imageData[1];
data: lr_utility type ref to cl_http_utility,
lv_buffer type xstring.
create object lr_utility.
lv_buffer = lr_utility->decode_x_base64( model->image_data ).
data: lv_length type i,
lt_bin_255 type w3mimetabtype.
call function 'SCMS_XSTRING_TO_BINARY'
exporting
buffer = lv_buffer
importing
output_length = lv_length
tables
binary_tab = lt_bin_255.
data: lr_igs_imgconv type ref to cl_igs_image_converter,
lv_img_type type w3conttype,
lv_img_size type w3contlen.
lv_img_size = lv_length.
create object lr_igs_imgconv
exporting
destination = 'IGS_RFC_DEST'.
lr_igs_imgconv->set_image( exporting
blob = lt_bin_255
blob_size = lv_img_size ).
lr_igs_imgconv->input = 'image/jpeg'.
lr_igs_imgconv->output = 'image/x-ms-bmp'.
lr_igs_imgconv->execute( exceptions
communication_error = 1
internal_error = 2
external_error = 3
others = 4 ).
check sy-subrc is initial.
lr_igs_imgconv->get_image( importing
blob = lt_bin_255
blob_size = lv_img_size
blob_type = lv_img_type ).
call function 'SAPSCRIPT_CONVERT_BITMAP_BDS' ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
5 | |
5 | |
4 | |
4 | |
4 | |
4 | |
4 | |
3 | |
3 |