CN109859282A - The method for accessing picture - Google Patents

The method for accessing picture Download PDF

Info

Publication number
CN109859282A
CN109859282A CN201910111357.XA CN201910111357A CN109859282A CN 109859282 A CN109859282 A CN 109859282A CN 201910111357 A CN201910111357 A CN 201910111357A CN 109859282 A CN109859282 A CN 109859282A
Authority
CN
China
Prior art keywords
picture
configuration parameter
attribute
data structure
pictorial information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201910111357.XA
Other languages
Chinese (zh)
Inventor
张雷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Technology Information Technology Co Ltd
Original Assignee
Shenzhen Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Technology Information Technology Co Ltd filed Critical Shenzhen Technology Information Technology Co Ltd
Priority to CN201910111357.XA priority Critical patent/CN109859282A/en
Publication of CN109859282A publication Critical patent/CN109859282A/en
Pending legal-status Critical Current

Links

Landscapes

  • Television Signal Processing For Recording (AREA)

Abstract

The invention belongs to field of computer technology, disclose a kind of method for accessing picture, comprising: definition is used for the configuration parameter of compiling duration;It goes to define " picture attribute " data structure based on the configuration parameter;Auto-Generation Tool is called according to the configuration parameter, automatically generates the pictorial information for meeting the configuration parameter;Composing software is removed in conjunction with the configuration parameter and the pictorial information etc. automatically generated;Use digital mark for marking picture;Image data required for being obtained by the pictorial information automatically generated is for finally showing.Using the present invention, the relevant api interface of picture access under different application scene can be unified;By unified API interface, the generalization (once write, can run everywhere under different application scenarios) of application software code can be realized.

Description

The method for accessing picture
Technical field
The present invention relates to field of computer technology more particularly to a kind of methods for accessing picture.
Background technique
I proposes the entitled " method, apparatus and meter of display interface to State Intellectual Property Office on June 30th, 2018 Calculation machine readable storage medium storing program for executing " application, application number: 2018107027910.
With the development of internet, user produces many personalized, customization interface display demands, among these: having It is needing remotely to show, also have and do not need remotely to show;It is in need be locally displayed, also have and does not need to be locally displayed.
With the development of electronic technology, it is desirable to provide the calculating equipment of interface display function is also more and more diversified, this its In: there is the equipment for supporting to be decoded to picture in the runtime, also there is the equipment for not supporting to be decoded to picture in the runtime.
Nowadays, the diversified interface display demand of above-mentioned user, with above-mentioned diversified calculating equipment and deposit, form big The permutation and combination of amount, different permutation and combination then represent the different demands of user, and the difference representated by different demands is answered With under scene, specific data required for softward interview picture are also different.For example, can support running when calculating equipment When phase is decoded picture, user can be used picture path as picture identification and remove access picture, and be solved by the runtime Code picture is come the width for obtaining picture is high and pixel data;But it can not support to be decoded picture in the runtime when calculating equipment When, user just cannot still use picture path as picture identification as that application scenarios before and access is gone to scheme Piece, under such application scenarios, user needs to remove access picture using the pixel data of picture and the specific width of picture are high.
Due to there are a large amount of different application scenarios, and under different application scene, tool required for softward interview picture Volume data is also different, this just causes trouble to the exploitation of graphic interface software.Drawback of the prior art is that: Yong Huxu Different application software codes is write respectively for different application scenarios.
To sum up, need to invent it is a kind of access picture new method, the new method can overcome the prior art drawbacks described above, It can unify the relevant api interface of picture access under different application scene;By unified API interface, can be realized using soft The generalization (once write, can be run everywhere under different application scenarios) of part code.
Summary of the invention
Based on this, to solve in traditional technology, " user needs to write respectively for different application scenarios different using soft The technical issues of part code ", spy propose a kind of method for accessing picture.
A method of access picture, comprising:
Define configuration parameter;Selectively, whether the configuration parameter includes whether to support to be locally displayed, and/or support long-range It shows, and/or whether supports runtime picture to decode, and/or compiling duration picture whether is supported to decode;
There are " picture attribute " data structures, for representing software image data required for the runtime;Based on described Configuration parameter goes the specific field of " picture attribute " data structure described in definition;
It can be with the Auto-Generation Tool of " picture attribute " data structure described in automatically scanning, searching picture, generation there are one;Institute The pictorial information for meeting the configuration parameter can be generated according to the configuration parameter by stating Auto-Generation Tool;
Call the Auto-Generation Tool go generate pictorial information, the pictorial information include each picture number mark, " picture attribute " array etc. of one " picture attribute " data structure for containing all pictures;The number mark of picture Know and is corresponded with " picture attribute " data structure in " picture attribute " array;
Use the digital mark for marking picture;
In conjunction with the configuration parameter and the pictorial information generated by the Auto-Generation Tool, composing software is removed;
Described " picture attribute " data structure corresponding with the number mark is obtained by " picture attribute " array, is obtained To required image data for finally showing.
In some embodiments, more particularly:
Described by the pictorial information that the Auto-Generation Tool generates further includes having picture total number;
Described " picture attribute " data structure corresponding with the number mark is being obtained by " picture attribute " array During, it judges the number and identifies whether to be less than the picture total number, carry out fault-tolerant processing.
In some embodiments, more particularly, when the configuration parameter is not support the decoding of runtime picture, support When long-range display, " picture attribute " data structure includes following field:
The character string identification of picture;
The display width and height of picture.
In some embodiments, more particularly, when the configuration parameter is not support the decoding of runtime picture, support When the decoding of compiling duration picture, support are locally displayed, " picture attribute " data structure includes following field:
The storage address of the pixel data of picture;
The pixel format of picture;
The display width and height of picture.
In some embodiments, more particularly, described when the configuration parameter is to support the decoding of runtime picture " picture attribute " data structure includes following field:
The character string identification of picture.
Implement the embodiment of the present invention, will have the following beneficial effects: the picture access that can unify under different application scene Relevant api interface;By unified API interface, can be realized application software code generalization (once write, can be not It is run everywhere under same application scenarios).
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Other embodiments are obtained according to these embodiments.
Wherein:
Fig. 1 shows the flow diagram of the method for the access picture of first embodiment offer;
Specific embodiment
Exemplary embodiment is described in detail below in reference to attached drawing, so that the personnel of the general knowledge with this field can be with Easily realize.The description to conventional partial is for the sake of clarity omitted, also, appended drawing reference similar in the text indicates Similar element.
Exemplary embodiment can be presented as various forms, and be not limited to exemplary embodiment provided herein.Obviously, institute The embodiment of description is only a part of the embodiment of the present invention, instead of all the embodiments.
Based on the embodiments of the present invention, those of ordinary skill in the art are obtained without creative efforts The every other embodiment obtained, shall fall within the protection scope of the present invention.
The following detailed description is substantially merely exemplary, and is not intended to the limitation present invention and/or its application and is made With.Without departing from the spirit and scope of the disclosure, the General Principle defined here can be applied to other implementations Example and application.Therefore, the present invention is not limited to the embodiment shown, but meets consistent with principle disclosed herein and feature Widest scope.
Although disclosed by the invention is the method for accessing picture, it should be evident that method disclosed by the invention and not only Suitable for access picture, can be applicable to and resource files other as picture category.Therefore, the present invention is not limited to show Embodiment, but meet and principle disclosed herein and the consistent widest scope of feature.
Embodiment 1
For the skill for solving " user needs to write different application software codes respectively for different application scenarios " in traditional technology Art problem, in the present embodiment, spy propose a kind of method for accessing picture.
The realization of the method can be dependent on computer program, which can run on based on von Neumann system Computer system on.
Because those skilled in the art are apparent that the prior art has evolved to hardware, software or hardware/software combination Between almost without difference stage, thus select hardware or software to realize that concrete function is the design choosing for leaving implementor for It selects.More specifically, those skilled in the art are apparent that software process can be transformed into hardware configuration of equal value, and hardware configuration It itself can be transformed into software process of equal value.Therefore, for the selection of hardware realization or software realization be design alternative simultaneously Leave implementor for.
Specifically, as shown in Figure 1, the method for the access picture includes the following steps S101-S106:
Step S101 defines configuration parameter.
Selectively, the configuration parameter include whether support be locally displayed, and/or whether support remotely show, and/or Whether support runtime picture to decode, and/or compiling duration picture whether is supported to decode.Wherein, if support, which is locally displayed, is also Belong to selectable.
Step S102, there are " picture attribute " data structures.
" picture attribute " data structure is for representing software image data required for the runtime;User can be with base The specific field of " picture attribute " data structure described in definition is gone in the configuration parameter.
Step S103, there are an Auto-Generation Tools.
There are one to automatically generate work with " picture attribute " data structure described in automatically scanning, searching picture, generation Tool;The Auto-Generation Tool can generate the file for meeting the configuration parameter according to the configuration parameter.
Step S104 calls the Auto-Generation Tool to go to generate pictorial information.
It is selectable, when calling the Auto-Generation Tool, Auto-Generation Tool Transfer Parameters, the ginseng of transmitting can be given Number may include the configuration parameter;The Auto-Generation Tool can go to generate pictorial information according to the parameter received.
The pictorial information include each picture number mark, one contain " the picture category of all pictures " picture attribute " array etc. of property " data structure;Picture it is described number mark with it is described in " picture attribute " array " picture attribute " data structure corresponds.The number mark of picture can be used as " picture attribute " array described in access Subscript and index.
When the configuration parameter is not support the decoding of runtime picture, support long-range display, " picture attribute " number Include following field according to structure:
The character string identification of picture;
The display width and height of picture.
When the configuration parameter is that the decoding of runtime picture, the decoding of support compiling duration picture, support is not supported to be locally displayed When, " picture attribute " data structure includes following field:
The storage address of the pixel data of picture;
The pixel format of picture;
The display width and height of picture.
When the configuration parameter is to support the decoding of runtime picture, " picture attribute " data structure includes as follows Field:
The character string identification of picture.
Selectable, described by the pictorial information that the Auto-Generation Tool generates further includes having picture total number.
Step S105 uses the digital mark for marking picture.
In software code using digital mark for marking, access picture.
Step S106 removes composing software in conjunction with the configuration parameter and the pictorial information automatically generated.
In conjunction with the configuration parameter and the pictorial information generated by the Auto-Generation Tool, composing software is removed.
Step S107 obtains image data for finally showing.
Described " picture attribute " data knot corresponding with the number mark is obtained by " picture attribute " array Structure obtains required image data for finally showing (or carrying out any required operation using image data).
It is selectable, " the picture corresponding with the number mark is being obtained by " picture attribute " array During attribute " data structure, judges the number and identify whether to be less than the total of element in described " picture attribute " array Number carries out fault-tolerant processing.If the total number of number mark element in " picture attribute " array not less than described in, for Error.
It is selectable, " the picture corresponding with the number mark is being obtained by " picture attribute " array During attribute " data structure, judges the number and identify whether to be less than the picture total number, carry out fault-tolerant processing. If the number mark is not less than the picture total number, for error.
Implement the embodiment of the present invention, will have the following beneficial effects: the picture access that can unify under different application scene Relevant api interface;By unified API interface, can be realized application software code generalization (once write, can be not It is run everywhere under same application scenarios).
In the above-described embodiments, can it is all or part of by software, hardware, firmware or any combination thereof come real It is existing.When being realized using software program, can entirely or partly realize in the form of a computer program product.Computer program Product includes one or more computer instructions.It is all or part of when loading on computers and executing computer program instructions Ground generates the process or function according to the embodiment of the present invention.Computer can be general purpose computer, special purpose computer or other Programmable device.Computer instruction may be stored in a computer readable storage medium, or from a computer-readable storage Medium to another computer readable storage medium transmit, for example, computer instruction can from a web-site, computer, Server or data center by wired (such as coaxial cable, optical fiber, Digital Subscriber Line (DSL)) or wireless (such as it is infrared, Wirelessly, microwave etc.) mode transmitted to another web-site, computer, server or data center.It is computer-readable Storage medium can be any usable medium that computer can access or include that one or more usable mediums are integrated The data storage devices such as server, data center.Usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), light Medium (for example, DVD) or semiconductor medium (such as solid state hard disk Solid State Disk(SSD)) etc..
The above disclosure is only the preferred embodiments of the present invention, cannot limit the right model of the present invention with this certainly It encloses, therefore equivalent changes made in accordance with the claims of the present invention, is still within the scope of the present invention;Those skilled in the art exist Under the premise of not making creative work, the other embodiments of acquisition are still within the scope of the present invention.

Claims (5)

1. a kind of method for accessing picture, comprising:
Define configuration parameter;Selectively, whether the configuration parameter includes whether to support to be locally displayed, and/or support long-range It shows, and/or whether supports runtime picture to decode, and/or compiling duration picture whether is supported to decode;
There are " picture attribute " data structures, for representing software image data required for the runtime;Based on described Configuration parameter goes the specific field of " picture attribute " data structure described in definition;
It can be with the Auto-Generation Tool of " picture attribute " data structure described in automatically scanning, searching picture, generation there are one;Institute The pictorial information for meeting the configuration parameter can be generated according to the configuration parameter by stating Auto-Generation Tool;
Call the Auto-Generation Tool go generate pictorial information, the pictorial information include each picture number mark, " picture attribute " array etc. of one " picture attribute " data structure for containing all pictures;The number mark of picture Know and is corresponded with " picture attribute " data structure in " picture attribute " array;
Use the digital mark for marking picture;
In conjunction with the configuration parameter and the pictorial information generated by the Auto-Generation Tool, composing software is removed;
Described " picture attribute " data structure corresponding with the number mark is obtained by " picture attribute " array, is obtained To required image data for finally showing.
2. as described in claim 1, more particularly:
Described by the pictorial information that the Auto-Generation Tool generates further includes having picture total number;
Described " picture attribute " data structure corresponding with the number mark is being obtained by " picture attribute " array During, it judges the number and identifies whether to be less than the picture total number, carry out fault-tolerant processing.
3. as claimed in claim 1 or 2, more particularly, when the configuration parameter is not support the decoding of runtime picture, branch When holding long-range display, " picture attribute " data structure includes following field:
The character string identification of picture;
The display width and height of picture.
4. as claimed in claim 1 or 2, more particularly, when the configuration parameter is not support the decoding of runtime picture, branch When holding the decoding of compiling duration picture, supporting to be locally displayed, " picture attribute " data structure includes following field:
The storage address of the pixel data of picture;
The pixel format of picture;
The display width and height of picture.
5. as claimed in claim 1 or 2, more particularly, when the configuration parameter is to support the decoding of runtime picture, institute Stating " picture attribute " data structure includes following field:
The character string identification of picture.
CN201910111357.XA 2019-02-12 2019-02-12 The method for accessing picture Pending CN109859282A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910111357.XA CN109859282A (en) 2019-02-12 2019-02-12 The method for accessing picture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910111357.XA CN109859282A (en) 2019-02-12 2019-02-12 The method for accessing picture

Publications (1)

Publication Number Publication Date
CN109859282A true CN109859282A (en) 2019-06-07

Family

ID=66897818

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910111357.XA Pending CN109859282A (en) 2019-02-12 2019-02-12 The method for accessing picture

Country Status (1)

Country Link
CN (1) CN109859282A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080012987A1 (en) * 2006-06-30 2008-01-17 Sharp Kabushiki Kaisha Image data providing apparatus, image display apparatus, image display system, method for controlling image data providing apparatus, method for controlling image display apparatus, control program, and recording medium
CN103324740A (en) * 2013-06-28 2013-09-25 深圳市九洲电器有限公司 Set-top box and method and device for displaying pictures
CN104035674A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Picture displaying method and device
CN104267947A (en) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 Method and device for editing popup picture
CN106980579A (en) * 2016-09-30 2017-07-25 阿里巴巴集团控股有限公司 A kind of picture loading method and device
CN108595698A (en) * 2018-05-09 2018-09-28 平安普惠企业管理有限公司 picture loading method, terminal device and medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080012987A1 (en) * 2006-06-30 2008-01-17 Sharp Kabushiki Kaisha Image data providing apparatus, image display apparatus, image display system, method for controlling image data providing apparatus, method for controlling image display apparatus, control program, and recording medium
CN103324740A (en) * 2013-06-28 2013-09-25 深圳市九洲电器有限公司 Set-top box and method and device for displaying pictures
CN104035674A (en) * 2014-05-23 2014-09-10 小米科技有限责任公司 Picture displaying method and device
CN104267947A (en) * 2014-09-23 2015-01-07 广州金山网络科技有限公司 Method and device for editing popup picture
CN106980579A (en) * 2016-09-30 2017-07-25 阿里巴巴集团控股有限公司 A kind of picture loading method and device
CN108595698A (en) * 2018-05-09 2018-09-28 平安普惠企业管理有限公司 picture loading method, terminal device and medium

Similar Documents

Publication Publication Date Title
CN111552473B (en) Application processing method, device and equipment
CN103049320B (en) In browser, start the method and apparatus of external application
CN106201481A (en) Assembly management method and apparatus in application development system
CN107957911A (en) Method and apparatus, the method and apparatus of module data processing of component call
CN104169902B (en) Synchronous local and remote data
CN102779063A (en) Method for providing application invocation and server
CN105335132A (en) Method, apparatus and system for user-defined application function
CN103530338A (en) Frame for carrying out page rendering on calculation equipment and page generation method
CN109359281A (en) Dynamic list generation method and device
CN111475227A (en) Business plug-in loading implementation method and device and terminal equipment
CN105824517A (en) Implementation method and apparatus of desktop
CN111427576A (en) Method, device, storage medium and terminal for configuring application program interface
CN108833584B (en) Message pushing method, terminal, server and computer storage medium
CN115033235A (en) System and method for flexibly multiplexing web page based on low-code development platform
CN108073698B (en) Real-time animation display methods, device, electric terminal and readable storage medium storing program for executing
CN105354090B (en) Management method and device of virtual equipment
CN110008431B (en) Page component construction method and device, page generation equipment and readable storage medium
CN115826963A (en) Process event development multiplexing method and system based on low-code development platform
CN110069247A (en) A kind of development approach and device, application method and device of application program
CN109766095A (en) A kind of thematic page creation method of activity, relevant apparatus and equipment
CN113535220B (en) Code packet management method and device
CN109804599A (en) Service is provided according to user right
CN109859282A (en) The method for accessing picture
KR100677141B1 (en) Apparatus and Method for performing an one to one name-based socket-communication
CN102184105A (en) Data processing method based on modularity and data center system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20190607