Posted: Mon Aug 01, 2011 3:13 pm Post subject: Как отобразить картинку GIF с несколькими кадрами(стран-ми)?
Добрый день. Возникла проблема с отображением картинки GIFF с несколькими кадрами(страницами). Делал программу на основе RSDEMO_PICTURE_CONTROL.
Использовал 2 класса cl_gui_picture и cl_gui_html_viewer.
Вывел в контейнер для класса cl_gui_picture, но отображается только первая страница.
Пробовал загрузить в PDF в компонент IMAGE ситуация повторилась, только 1-я страница.
Для класса cl_gui_html_viewer вывел в Browser но там он отобразил многостраничный GIF, который отображался циклически без остановки.
Может кто знает как сделать заданный переход на другии страницы?
Привожу пример кода для наглядности:
Code:
TYPE-POOLS cndp.
DATA container TYPE REF TO cl_gui_custom_container.
DATA picture TYPE REF TO cl_gui_picture.
DATA ok_code TYPE sy-ucomm.
DATA events TYPE cntl_simple_events.
DATA wa_events TYPE cntl_simple_event.
DATA url(255).
*----------------------------------------------------------------------*
* CLASS cl_base DEFINITION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_base DEFINITION FINAL.
PUBLIC SECTION.
METHODS handle_double_click
FOR EVENT picture_dblclick OF cl_gui_picture
IMPORTING mouse_pos_x
mouse_pos_y.
ENDCLASS. "cl_base DEFINITION
*----------------------------------------------------------------------*
* CLASS cl_base IMPLEMENTATION
*----------------------------------------------------------------------*
*
*----------------------------------------------------------------------*
CLASS cl_base IMPLEMENTATION.
METHOD handle_double_click.
PERFORM handle_double_click USING mouse_pos_x mouse_pos_y.
ENDMETHOD. "handle_double_click
ENDCLASS. "cl_base IMPLEMENTATION
CALL SCREEN 100. " на экране только контейнер
&---------------------------------------------------------------------*
*& Module STATUS_0100 OUTPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE status_0100 OUTPUT.
SET PF-STATUS 'ZP_FI359_ST'.
* SET TITLEBAR 'xxx'.
CREATE OBJECT event_receiver.
SET HANDLER event_receiver->handle_double_click FOR picture.
DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.
DATA html_table LIKE w3html OCCURS 1.
DATA return_code LIKE w3param-ret_code.
DATA content_type LIKE w3param-cont_type.
DATA content_length LIKE w3param-cont_len.
DATA pic_data LIKE w3mime OCCURS 0.
*&---------------------------------------------------------------------*
*& Form HANDLE_DOUBLE_CLICK
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_MOUSE_POS_X text
* -->P_MOUSE_POS_Y text
*----------------------------------------------------------------------*
FORM handle_double_click USING p_mouse_pos_x TYPE i
p_mouse_pos_y TYPE i.
BREAK-POINT.
ENDFORM. " HANDLE_DOUBLE_CLICK
Code:
DATA container TYPE REF TO cl_gui_custom_container.
DATA html TYPE REF TO cl_gui_html_viewer.
DATA ok_code TYPE sy-ucomm.
DATA url(255).
pbo_0100.
IF container IS INITIAL .
CREATE OBJECT container
EXPORTING
container_name = 'CUSTOM_CONTAINER'.
DATA query_table LIKE w3query OCCURS 1 WITH HEADER LINE.
DATA html_table LIKE w3html OCCURS 1.
DATA return_code LIKE w3param-ret_code.
DATA content_type LIKE w3param-cont_type.
DATA content_length LIKE w3param-cont_len.
DATA pic_data LIKE w3mime OCCURS 0.
Сделал еще более простой способ.
1) поставил стороннюю программу просмотра, которая умеет перелистывать по кадрам GIF
2) назначил ее программой по умолчанию для GIF русунков
3) вызвал Execute просмотр данного файла через SAP
Результат: открылось все нормально, НО ЕСТЬ БОЛЬШОЕ НО
1) во первых хранение локальной копии картинки
2) во-вторых нет безопасного просмотра файлов без возможности сохранения и печати (В них содержится информация по договорам)
3) необходимость установки сторонней программы
Воспользовался классом cl_gui_ecl_2dviewer. Сделал на основе ссылки: http://www.sapfans.com/forums/viewtopic.php?t=251181.
В результате получилось что для многостраничного GIF отражает последнюю страницу(кадр). (Проверил для формата TIFF аналогичный вывод, все хорошо получилось именно то что нужно, с переходами по кадрам(страницам))
Решил переделать GIF -> TIFF используя класс cl_igs_image_converter. Результат: потерял многостраничность.
Может кто знает как GIF переконвертировать в TIFF или кто еще посоветует как открыть многостраничный GIF ?
Привожу фрагмент кода с использованием класса cl_gui_ecl_2dviewer:
Code:
FORM load_acd CHANGING pc_main_container
TYPE REF TO cl_gui_custom_container
pc_acd_viewer TYPE REF TO cl_gui_ecl_2dviewer.
DATA: l_t_line_gif_hex TYPE solix_tab
, l_t_line_tif_hex TYPE solix_tab
, l_w_xstring TYPE xstring
, pic_size TYPE i.
.
DATA: w_filename TYPE char255,
w_error_code TYPE sysubrc.
* Конвертирую в BIN формат, по скольку данные мне
* приходят в HEX формате
l_w_xstring = l_w_row-g_image.
pic_size = XSTRLEN( l_w_xstring ).
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = l_w_xstring
TABLES
binary_tab = l_t_line_gif_hex.
Решил сам. Для этого понадобилось описание стандарта GIF. http://www.w3.org/Graphics/GIF/spec-gif89a.txt
Создал ФМ.
Входные данные: тип xstring. В такой формат картинка преобразуется в 2 этапа:
1) считывается картинка во внут.табл. типа solix_tab в формате BIN (метод cl_gui_frontend_services=>gui_upload)
2) преобразуется в формат xstring ( ФМ: SCMS_BINARY_TO_XSTRING )
Выходные данные: Таблица типа XSTRING_TABLE
Результат: многостраничный GIF разделяется на кадры, как отдельные картинки. Сохранение на локальный диск сделано для тестирования, чтобы видеть конечный результат.
Пример кода:
TOP
Code:
CONSTANTS
: co_graphic_control_ext TYPE x LENGTH 3 VALUE '21F904'
, co_trailer TYPE x LENGTH 1 VALUE '3B'
, co_comment_ext TYPE x LENGTH 2 VALUE '21FE'
, co_image_descriptor TYPE x LENGTH 1 VALUE '2C'
, co_plain_text_ext TYPE x LENGTH 3 VALUE '210112'
, co_application_ext TYPE x LENGTH 3 VALUE '21FF0B'
, co_block_terminator TYPE x LENGTH 1 VALUE '00'
.
* Table constant Convert HEX -> BIT -> Dec
TYPES: BEGIN OF ty_hex_bit_dec,
hex TYPE c LENGTH 1,
bit TYPE char4,
dec TYPE char12,
END OF ty_hex_bit_dec.
TYPES: ty_t_hex_bit_dec TYPE SORTED TABLE OF ty_hex_bit_dec
WITH UNIQUE KEY hex bit dec.
DATA: l_t_hex_bit_dec TYPE ty_t_hex_bit_dec
, l_w_hex_bit_dec LIKE LINE OF l_t_hex_bit_dec
.
* extention
TYPES: BEGIN OF ty_extention,
introducer TYPE x LENGTH 1,
label TYPE x LENGTH 1,
block_data TYPE xstring,
block_terminator TYPE x LENGTH 1,
END OF ty_extention.
TYPES: ty_t_extention TYPE STANDARD TABLE OF ty_extention.
DATA: l_t_extention TYPE ty_t_extention
, l_w_extention LIKE LINE OF l_t_extention
.
* Logical Screen Descriptor
TYPES: BEGIN OF ty_lsd_packed_fields,
packed_fields_hex TYPE x LENGTH 1,
packed_fields_bit TYPE c LENGTH 8,
gct_flag TYPE c LENGTH 1,
cr_bit TYPE c LENGTH 3,
cr_dec TYPE i,
sort_flag TYPE c LENGTH 1,
size_gct_bit TYPE c LENGTH 3,
size_gct_byte TYPE i,
END OF ty_lsd_packed_fields.
DATA: ls_lsd_packed_fields TYPE ty_lsd_packed_fields.
TYPES: BEGIN OF ty_logical_screen_descriptor,
width TYPE x LENGTH 2,
hight TYPE x LENGTH 2,
packed_fields LIKE ls_lsd_packed_fields,
background_color_index TYPE x LENGTH 1,
pixel_aspect_ratio TYPE x LENGTH 1,
END OF ty_logical_screen_descriptor.
DATA: ls_lsd TYPE ty_logical_screen_descriptor.
* Image descriptor
TYPES: BEGIN OF ty_image_packed_fields,
packed_fields_hex TYPE x LENGTH 1,
packed_fields_bit TYPE c LENGTH 8,
lct_flag TYPE c LENGTH 1,
interlace_flag TYPE c LENGTH 1,
sort_flag TYPE c LENGTH 1,
reserved TYPE c LENGTH 2,
size_lct_bit TYPE c LENGTH 3,
size_lct_byte TYPE i,
END OF ty_image_packed_fields.
DATA: ls_image_packed_fields TYPE ty_image_packed_fields.
TYPES: BEGIN OF ty_image_descriptor,
separator TYPE x LENGTH 1,
left TYPE x LENGTH 2,
top TYPE x LENGTH 2,
width TYPE x LENGTH 2,
high TYPE x LENGTH 2,
packed_fields LIKE ls_image_packed_fields,
END OF ty_image_descriptor.
DATA: ls_image_descriptor TYPE ty_image_descriptor.
TYPES: BEGIN OF ty_image,
descriptor LIKE ls_image_descriptor,
lct TYPE xstring,
lzw_code_size TYPE x LENGTH 1,
image_data TYPE xstring,
block_terminator TYPE x LENGTH 1,
END OF ty_image.
TYPES: ty_t_image TYPE STANDARD TABLE OF ty_image.
DATA: l_t_image TYPE ty_t_image
, l_w_image LIKE LINE OF l_t_image
.
* GIF
TYPES: BEGIN OF ty_gif,
signature TYPE x LENGTH 3,
version TYPE x LENGTH 3,
lsd LIKE ls_lsd,
gct TYPE xstring,
t_image LIKE l_t_image,
t_extention LIKE l_t_extention,
terminator TYPE x LENGTH 1,
END OF ty_gif.
DATA: g_w_gif TYPE ty_gif.
DATA: g_lenght TYPE i.
*macros fill table constant Convert HEX -> BIT -> Dec
DEFINE load_hex_bit_dec.
clear: l_w_hex_bit_dec.
l_w_hex_bit_dec-hex = &1.
l_w_hex_bit_dec-bit = &2.
l_w_hex_bit_dec-dec = &3.
insert l_w_hex_bit_dec into table l_t_hex_bit_dec.
END-OF-DEFINITION.
Function Module Load Image GIF with Multipage
Code:
UNCTION zparser_gif .
*"----------------------------------------------------------------------
*"*"Локальный интерфейс:
*" IMPORTING
*" VALUE(IM_XSTRING) TYPE XSTRING
*" EXPORTING
*" VALUE(EX_T_GIF) TYPE XSTRING_TABLE
*"----------------------------------------------------------------------
PERFORM parser_gif USING im_xstring
CHANGING g_w_gif.
PERFORM devide_gif USING g_w_gif
CHANGING ex_t_gif.
ENDFUNCTION.
Forms
Code:
*&---------------------------------------------------------------------*
*& Form CONVERT_HEX_TO_BIT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_L_W_GIF_LSD_PACKED_FIELDS_PACK text
* <--P_L_W_GIF_LSD_PACKED_FIELDS_PACK text
*----------------------------------------------------------------------*
FORM convert_hex_to_bit USING value(p_hex)
CHANGING c_bit.
DATA: l_hex TYPE c LENGTH 2
, l_w_hex_bit_dec TYPE ty_hex_bit_dec
.
CLEAR: c_bit.
l_hex = p_hex.
READ TABLE l_t_hex_bit_dec INTO l_w_hex_bit_dec
WITH KEY hex = l_hex(1).
IF sy-subrc EQ 0.
CONCATENATE c_bit
l_w_hex_bit_dec-bit
INTO c_bit.
ENDIF.
READ TABLE l_t_hex_bit_dec INTO l_w_hex_bit_dec
WITH KEY hex = l_hex+1(1).
IF sy-subrc EQ 0.
CONCATENATE c_bit
l_w_hex_bit_dec-bit
INTO c_bit.
ENDIF.
ENDFORM. " CONVERT_HEX_TO_BIT
*&---------------------------------------------------------------------*
*& Form convert_bin_dec
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->VALUE(P_BIN) text
* -->C_DEC text
*----------------------------------------------------------------------*
FORM convert_bit_dec USING value(p_bit)
CHANGING c_dec TYPE i.
DATA: l_lenght TYPE i
, l_result TYPE i
, l_index TYPE i
.
*&---------------------------------------------------------------------*
*& Form exponent
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->VALUE(P_BASE) text
* -->VALUE(P_EXPONENT) text
* -->C_RESULT text
*----------------------------------------------------------------------*
FORM exponent USING value(p_base)
value(p_exponent)
CHANGING c_result TYPE f.
DATA: res TYPE f
, l_exponent TYPE i
, l_base TYPE p
, l_tmp TYPE i
.
WHILE l_exponent > 0.
l_tmp = l_exponent MOD 2.
IF l_tmp = 0.
l_exponent = l_exponent DIV 2.
TRY.
l_base = l_base * l_base.
CATCH cx_sy_arithmetic_overflow.
CLEAR l_base.
EXIT.
ENDTRY.
ELSE.
l_exponent = l_exponent - 1.
res = res * l_base.
ENDIF.
ENDWHILE.
c_result = res.
ENDFORM. " exponent
*&---------------------------------------------------------------------*
*& Form block_data
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_W_XSTRING text
* -->P_LENGHT text
* -->C_T_BLOCK text
* -->C_OFFSET text
*----------------------------------------------------------------------*
FORM block_data USING p_xstring TYPE xstring
p_lenght TYPE i
CHANGING c_block TYPE xstring
c_offset TYPE i.
DATA: l_size_hex TYPE x LENGTH 1
, l_size_bit TYPE c LENGTH 8
, l_size_dec TYPE i
, l_offset_in TYPE i
.
* block size
l_size_hex = p_xstring+c_offset(1).
ADD 1 TO c_offset.
* convert hex->bit
PERFORM convert_hex_to_bit
USING l_size_hex
CHANGING l_size_bit.
* convert bit->dec
PERFORM convert_bit_dec
USING l_size_bit
CHANGING l_size_dec.
ADD l_size_dec TO c_offset.
ENDDO.
ENDFORM. " BLOCK_DATA
*&---------------------------------------------------------------------*
*& Form extention
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->VALUE(P_EXTENTION) text
* -->P_W_XSTRING text
* -->P_OFF text
* -->P_LENGHT text
* -->C_T_EXTENTION text
*----------------------------------------------------------------------*
FORM extention USING value(p_extention)
p_w_xstring TYPE xstring
p_off TYPE i
p_lenght TYPE i
CHANGING c_t_extention TYPE ty_t_extention.
DATA: l_ofs TYPE i
, l_offset TYPE i
, l_w_extention TYPE ty_extention
.
CLEAR: l_offset.
l_ofs = p_off.
DO.
FIND p_extention IN SECTION OFFSET l_ofs
OF p_w_xstring IN BYTE MODE
MATCH OFFSET l_offset.
IF sy-subrc NE 0.
EXIT.
ENDIF.
CLEAR: l_w_extention.
* block introducer
l_w_extention-introducer = p_w_xstring+l_offset(1).
ADD 1 TO l_offset.
* block label
l_w_extention-label = p_w_xstring+l_offset(1).
ADD 1 TO l_offset.
* block data
PERFORM block_data USING p_w_xstring
p_lenght
CHANGING l_w_extention-block_data
l_offset.
* block terminator
l_w_extention-block_terminator = p_w_xstring+l_offset(1).
ADD 1 TO l_offset.
APPEND l_w_extention TO c_t_extention.
l_ofs = l_offset.
ENDDO.
ENDFORM. " EXTENTION
*&---------------------------------------------------------------------*
*& Form PARSER_GIF
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_IM_XSTRING text
* <--P_G_W_GIF text
*----------------------------------------------------------------------*
FORM parser_gif USING p_xstring TYPE xstring
CHANGING c_w_gif TYPE ty_gif.
DATA: l_lenght TYPE i
, l_off TYPE i
, l_offset TYPE i
, l_ofs TYPE i
, l_w_image TYPE ty_image
.
BREAK-POINT ID zraf.
* lenght
l_lenght = XSTRLEN( p_xstring ).
CLEAR: c_w_gif.
* Header
CLEAR: l_off.
c_w_gif-signature = p_xstring(3).
ADD 3 TO l_off.
c_w_gif-version = p_xstring+l_off(3).
ADD 3 TO l_off.
* Logical Screen Descriptor
c_w_gif-lsd-width = p_xstring+l_off(2).
ADD 2 TO l_off.
c_w_gif-lsd-hight = p_xstring+l_off(2).
ADD 2 TO l_off.
c_w_gif-lsd-packed_fields-packed_fields_hex = p_xstring+l_off(1).
ADD 1 TO l_off.
c_w_gif-lsd-background_color_index = p_xstring+l_off(1).
ADD 1 TO l_off.
c_w_gif-lsd-pixel_aspect_ratio = p_xstring+l_off(1).
ADD 1 TO l_off.
* Global Color Table Flag 1 Bit
c_w_gif-lsd-packed_fields-gct_flag =
c_w_gif-lsd-packed_fields-packed_fields_bit(1).
IF c_w_gif-lsd-packed_fields-gct_flag EQ 1.
* Color Resolution 3 Bits
c_w_gif-lsd-packed_fields-cr_bit =
c_w_gif-lsd-packed_fields-packed_fields_bit+1(3).
* convert bit->dec
PERFORM convert_bit_dec
USING c_w_gif-lsd-packed_fields-cr_bit
CHANGING c_w_gif-lsd-packed_fields-cr_dec.
ADD 1 TO c_w_gif-lsd-packed_fields-cr_dec.
* Sort Flag 1 Bit
c_w_gif-lsd-packed_fields-sort_flag =
c_w_gif-lsd-packed_fields-packed_fields_bit+4(1).
* Size of Global Color Table 3 Bits
c_w_gif-lsd-packed_fields-size_gct_bit =
c_w_gif-lsd-packed_fields-packed_fields_bit+5(3).
PERFORM get_size_tcolor
USING c_w_gif-lsd-packed_fields-size_gct_bit
CHANGING c_w_gif-lsd-packed_fields-size_gct_byte.
* Global Color Table
c_w_gif-gct =
p_xstring+l_off(c_w_gif-lsd-packed_fields-size_gct_byte).
ADD c_w_gif-lsd-packed_fields-size_gct_byte TO l_off.
ENDIF.
* Image Descriptor
CLEAR: l_offset.
l_ofs = l_off.
DO.
FIND co_image_descriptor IN SECTION OFFSET l_ofs
OF p_xstring IN BYTE MODE
MATCH OFFSET l_offset.
IF sy-subrc NE 0.
EXIT.
ENDIF.
CLEAR: l_w_image.
l_w_image-descriptor-separator = p_xstring+l_offset(1).
ADD 1 TO l_offset.
l_w_image-descriptor-left = p_xstring+l_offset(2).
ADD 2 TO l_offset.
l_w_image-descriptor-top = p_xstring+l_offset(2).
ADD 2 TO l_offset.
l_w_image-descriptor-width = p_xstring+l_offset(2).
ADD 2 TO l_offset.
l_w_image-descriptor-high = p_xstring+l_offset(2).
ADD 2 TO l_offset.
l_w_image-descriptor-packed_fields-packed_fields_hex
= p_xstring+l_offset(1).
ADD 1 TO l_offset.
* convert hex->bit
PERFORM convert_hex_to_bit
USING l_w_image-descriptor-packed_fields-packed_fields_hex
CHANGING l_w_image-descriptor-packed_fields-packed_fields_bit.
* Local Color Table Flag 1 Bit
l_w_image-descriptor-packed_fields-lct_flag =
l_w_image-descriptor-packed_fields-packed_fields_bit(1).
IF l_w_image-descriptor-packed_fields-lct_flag EQ 1.
* Interlace Flag 1 Bit
l_w_image-descriptor-packed_fields-interlace_flag =
l_w_image-descriptor-packed_fields-packed_fields_bit+1(1).
* Sort Flag 1 Bit
l_w_image-descriptor-packed_fields-sort_flag =
l_w_image-descriptor-packed_fields-packed_fields_bit+2(1).
* Reserved 2 Bits
l_w_image-descriptor-packed_fields-reserved =
l_w_image-descriptor-packed_fields-packed_fields_bit+3(2).
* Size of Local Color Table 3 Bits
l_w_image-descriptor-packed_fields-size_lct_bit =
l_w_image-descriptor-packed_fields-packed_fields_bit+5(3).
PERFORM get_size_tcolor
USING l_w_image-descriptor-packed_fields-size_lct_bit
CHANGING l_w_image-descriptor-packed_fields-size_lct_byte.
* Local Color Table
l_w_image-lct =
p_xstring+l_offset(l_w_image-descriptor-packed_fields-size_lct_byte).
ADD l_w_image-descriptor-packed_fields-size_lct_byte TO l_offset.
ENDIF.
* lzw min code size
l_w_image-lzw_code_size = p_xstring+l_offset(1).
ADD 1 TO l_offset.
* block data
PERFORM block_data USING p_xstring
l_lenght
CHANGING l_w_image-image_data
l_offset.
* block_terminator
l_w_image-block_terminator = p_xstring+l_offset(1).
APPEND l_w_image TO c_w_gif-t_image.
l_ofs = l_offset.
ENDDO.
* Trailer GIF
SUBTRACT 1 FROM l_lenght.
c_w_gif-terminator = p_xstring+l_lenght(1).
ENDFORM. " PARSER_GIF
*&---------------------------------------------------------------------*
*& Form DEVICE_GIF
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_G_W_GIF text
* <--P_EX_T_GIF text
*----------------------------------------------------------------------*
FORM devide_gif USING p_w_gif TYPE ty_gif
CHANGING c_t_gif TYPE xstring_table.
DATA: l_count TYPE i
, l_index TYPE i
, l_xstring TYPE xstring
, l_w_image TYPE ty_image
.
FIELD-SYMBOLS: <lfs_xstring> TYPE xstring.
DESCRIBE TABLE p_w_gif-t_image LINES l_count.
CLEAR: l_index.
DO l_count TIMES.
CLEAR: l_xstring.
* Header
CONCATENATE p_w_gif-signature
p_w_gif-version
INTO l_xstring IN BYTE MODE.
* Logical Screen Descriptor
CONCATENATE l_xstring
p_w_gif-lsd-width
p_w_gif-lsd-hight
p_w_gif-lsd-packed_fields-packed_fields_hex
p_w_gif-lsd-background_color_index
p_w_gif-lsd-pixel_aspect_ratio
INTO l_xstring IN BYTE MODE.
* Global Color Table
IF p_w_gif-gct IS NOT INITIAL.
CONCATENATE l_xstring
p_w_gif-gct
INTO l_xstring IN BYTE MODE.
ENDIF.
ADD 1 TO l_index.
READ TABLE p_w_gif-t_image INTO l_w_image INDEX l_index.
IF sy-subrc NE 0.
CONTINUE.
ENDIF.
* Image
CONCATENATE l_xstring
l_w_image-descriptor-separator
l_w_image-descriptor-left
l_w_image-descriptor-top
l_w_image-descriptor-width
l_w_image-descriptor-high
l_w_image-descriptor-packed_fields-packed_fields_hex
INTO l_xstring IN BYTE MODE.
IF l_w_image-lct IS NOT INITIAL.
CONCATENATE l_xstring
l_w_image-lct
INTO l_xstring IN BYTE MODE.
ENDIF.
CONCATENATE l_xstring
l_w_image-lzw_code_size
l_w_image-image_data
l_w_image-block_terminator
INTO l_xstring IN BYTE MODE.
* Trailer GIF
CONCATENATE l_xstring
p_w_gif-terminator
INTO l_xstring IN BYTE MODE.
APPEND l_xstring TO c_t_gif.
DATA: l_length TYPE i
, l_t_line_gif_hex TYPE solix_tab
.
*&---------------------------------------------------------------------*
*& Form GET_SIZE_TCOLOR
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* -->P_L_W_IMAGE_DESCRIPTOR_PACKED_FI text
* <--P_L_W_IMAGE_DESCRIPTOR_PACKED_FI text
*----------------------------------------------------------------------*
FORM get_size_tcolor USING value(p_bit)
CHANGING c_byte TYPE i.
DATA: l_dec TYPE i
, l_count_color TYPE f
.
PERFORM convert_bit_dec USING p_bit
CHANGING l_dec.
ADD 1 TO l_dec.
* exponent 2
PERFORM exponent USING '2'
l_dec
CHANGING l_count_color.
* size Global Color Table in byte
c_byte = 3 * l_count_color.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.