CN114217758A - Image display method, image display device, electronic equipment and computer readable storage medium - Google Patents

Image display method, image display device, electronic equipment and computer readable storage medium Download PDF

Info

Publication number
CN114217758A
CN114217758A CN202111452510.9A CN202111452510A CN114217758A CN 114217758 A CN114217758 A CN 114217758A CN 202111452510 A CN202111452510 A CN 202111452510A CN 114217758 A CN114217758 A CN 114217758A
Authority
CN
China
Prior art keywords
image
target
displayed
coded data
area
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
CN202111452510.9A
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 TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202111452510.9A priority Critical patent/CN114217758A/en
Publication of CN114217758A publication Critical patent/CN114217758A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1407General aspects irrespective of display type, e.g. determination of decimal point position, display with fixed or driving decimal point, suppression of non-significant zeros
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The embodiment of the application discloses an image display method, an image display device, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a target image to be displayed and image coding data corresponding to the target image; determining a region to be displayed of the target image according to a target display window; selecting target coded data from the image coded data according to the area to be displayed; and loading the target encoding data. The method comprises the steps of determining a to-be-displayed area of an image according to a display window, and loading target coded data corresponding to the to-be-displayed area, so that image data corresponding to the display window is loaded, the image data of the whole large image is prevented from being loaded, the occupation of an operating memory is reduced, and the smoothness of image loading is improved.

Description

Image display method, image display device, electronic equipment and computer readable storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to an image display method, an image display device, electronic equipment and a computer-readable storage medium.
Background
With the rapid development of computer technology, the pixels of terminal equipment are higher and higher, and in order to pursue extreme definition, the images are larger and larger, wherein the loading of the large images occupies a large amount of running memory, so that the loading of the large images is easy to cause stagnation, which affects user experience.
Disclosure of Invention
The embodiment of the application provides an image display method and device, an electronic device and a computer readable storage medium, which can reduce memory occupation during image loading and improve image loading smoothness.
In a first aspect, an embodiment of the present application provides an image display method, including:
acquiring a target image to be displayed and image coding data corresponding to the target image;
determining a region to be displayed of the target image according to a target display window;
selecting target coded data from the image coded data according to the area to be displayed;
and loading the target encoding data.
In a second aspect, an embodiment of the present application further provides an image display apparatus, including:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a target image to be displayed and image coding data corresponding to the target image;
the determining module is used for determining a to-be-displayed area of the target image according to the target display window;
the selecting module is used for selecting target coded data from the image coded data according to the area to be displayed;
and the display module is used for loading the target coded data.
In a third aspect, an embodiment of the present application further provides an electronic device, where the electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the image display method when executing the computer program.
In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps in the image display method described above.
According to the method and the device, the area to be displayed of the image is determined according to the display window, the target coding data corresponding to the area to be displayed is loaded, the image data corresponding to the display window is loaded, the image data of the whole large image is prevented from being loaded, the occupation of an operating memory is reduced, and the smoothness of image loading is improved.
Drawings
In order to more clearly illustrate the technical solutions in the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a scene schematic diagram of an image display method provided in an embodiment of the present application;
FIG. 2 is a schematic flowchart of an image display method according to an embodiment of the present disclosure;
FIG. 3 is a schematic flow chart illustrating image compression in an image display method according to an embodiment of the present disclosure;
fig. 4 is a schematic flowchart of image loading in an image display method provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of an image display device provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the present application will be described clearly and completely with reference to the accompanying drawings in the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the application provides an image display method, an image display device, electronic equipment and a computer readable storage medium. Specifically, the embodiment of the application provides an image display device suitable for an electronic device, wherein the electronic device can be a terminal device. The terminal device may be a video camera, a television, a mobile phone, a tablet Computer, a Personal Computer (PC), or the like. The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the server may be directly or indirectly connected through wired or wireless communication.
In the embodiment of the present application, the terminal device may execute the image display method alone, or the server may execute the image display method alone, or the terminal device and the server execute the image display method together, please refer to fig. 1, which takes the case where the terminal device and the server execute the image display method together as an example, wherein other devices may be added on the basis of the terminal device and the server to assist in completing the image display method, and the types of the other devices are not limited herein; the terminal device and the server are connected through a network, for example, a wired or wireless network connection, and the specific implementation process is as follows:
a user selects a target image to be viewed through the terminal device 10 and displays the image on a display window of the terminal device 10;
the server 11 determines a to-be-displayed area of the target image according to the selection of the user and the display window of the user terminal device 10, selects target encoded data from image encoded data corresponding to the target image according to the to-be-displayed area, and sends the target encoded data to the terminal device 10, so that the terminal device 10 can load the selected target encoded data to display the to-be-displayed area image.
In the embodiment of the present application, the target image includes an image with a large image encoding data volume or an image with a long image length, for example, an image of more than 2 megabits (M) or more than 10 megabits (M), or a long image in which a single display window cannot fully display the image.
According to the image loading method and device, the regional images of the large and small portions of the display window are loaded and displayed, the image viewing requirements of users can be met, the data quantity loaded by the running memory can be reduced, the occupation of the running memory is reduced, and the image loading fluency is improved.
The embodiment of the application provides an image display method, which specifically comprises the following steps:
and acquiring a target image to be displayed and image coding data corresponding to the target image.
In the embodiment of the application, the target image is an image determined according to the viewing selection of the user, and after the user selects to view the image, the target image to be displayed can be determined on one side of the device according to the user instruction.
The image coding data is the storage numerical value of each pixel point in the image in the memory, wherein in the embodiment of the application, the image coding data is the coding data of the image after compression processing, and the memory occupied by the stored image is reduced through the compression of the image, and meanwhile, the memory occupied by the loaded image is also reduced.
And determining a region to be displayed of the target image according to the target display window.
The display window comprises a display screen area of the user side terminal equipment, the area to be displayed of the target image is determined according to the display window, so that the partial image area is conveniently loaded subsequently, the display of the target area image is realized, and the data volume of image loading is reduced (namely, only the partial image area is loaded instead of the whole large image).
And selecting target coded data from the image coded data according to the area to be displayed.
The target coded data are screened through the area to be displayed, and the accuracy of obtaining the target coded data is improved.
And loading the target encoding data.
For example, when a user enlarges and displays the image through a display window, actual pixel points which can be displayed in the image are reduced, and only the part of the pixel points are loaded and displayed, so that compared with the traditional loading and displaying of the whole image, the loading and displaying of the image data are reduced, and the fluency of image display is improved.
According to the method and the device, the area to be displayed of the image is determined according to the display window, the target coding data corresponding to the area to be displayed is loaded, the image data corresponding to the display window is loaded, the image data of the whole large image is prevented from being loaded, the occupation of an operating memory is reduced, and the smoothness of image loading is improved.
The following are detailed below. It should be noted that the description sequence of the following embodiments is not intended to limit the priority sequence of the embodiments.
Referring to fig. 2, fig. 2 is a schematic flow chart of an image display method according to an embodiment of the present disclosure. The specific flow of the image display method can be as follows:
101. and acquiring a target image to be displayed and image coding data corresponding to the target image.
The target image is selected and determined by a user in a display window of the terminal device, and the user selects the image to be viewed, so that the terminal can determine the target image to be displayed according to the instruction of the user.
In the embodiment of the present application, the target image includes an image with a large image encoding data volume or an image with a long image length, for example, an image of more than 2 megabits (M) or more than 10 megabits (M), or a long image in which a single display window cannot fully display the image.
The image coding data is storage data of the image in the memory, and comprises a storage numerical value of each pixel in the memory. For example, each image point of a high-definition or ultra-definition picture is generally composed of ARGB (three primary colors red, green, blue and transparency Alpha), each primary color value ranges from 0 to 255, and the conversion into a 16-system is 00-ff, so that assuming that such an image point has transparency of 0, red of 255, green of 255 and blue of 255, it can be expressed as Ox00ffff by a 16-system, which is a principle that a Bitmap (Bitmap) stores image data. Wherein Ox00 ffffffff is the storage value of the pixel in the memory.
In this embodiment of the present application, an image may be compressed and encoded according to a preset policy, that is, optionally, in some embodiments, before the step "acquiring a target image to be displayed and image encoding data corresponding to the target image", the method further includes:
acquiring original image coding data of an image to be processed;
and carrying out compression coding on the original image coded data according to a preset strategy to obtain the target image and the image coded data.
The image is compressed, so that the volume of the image is reduced, the memory occupied by storing the image is reduced, and the occupation of the running memory of the image during loading is reduced.
In the embodiment of the present application, the original image coded data is coded data formed after the image is shot, that is, coded data stored in the memory, wherein in the embodiment of the present application, the original image coded data of the image may be converted into a two-dimensional array, where the two-dimensional array includes original codes of each pixel point, and the original image coded data is compressed and coded according to the two-dimensional data.
In the embodiment of the present application, when compressing an image, a cross-compilation tool may be used to compile a library (libjpeg-turbo library) to generate a dynamic library (so dynamic library), and then the so dynamic library is imported into a project, and the project is used to compress the image, wherein an execution method (such as a private method JNI) may be further established in the project for executing the compression processing on the image; and a picture output path can be set in the project, a picture file writing method provided by a picture (jpeg) library is called, and the two-dimensional array pixel data in the picture cache region is rewritten into a compressed picture (target image) file according to the new configuration attribute.
For example, referring to fig. 3, fig. 3 is a schematic flow chart of image compression in the embodiment of the present application, which is as follows:
111. compiling source codes in a library of existence (libjpeg-turbo library) to generate a dynamic library (so dynamic library);
112. importing a dynamic library (so dynamic library) into a project;
113. processing an original image into a Bitmap (Bitmap) object;
114. calling a JNI method to process the bitmap object, and storing the obtained two-dimensional array of image pixel points into a buffer area;
115. and calling a dynamic library (so dynamic library) to re-encode (Huffman encode) the two-dimensional array in the buffer, and storing the re-encoded target image in a local place.
The volume of the image is reduced by compressing the image, and the storage and loading of the image are facilitated.
In the embodiment of the application, the image can be read and written into a Bitmap (Bitmap) object, and the Bitmap matrix data is analyzed to obtain the two-dimensional array of the pixel points in the image. In the embodiment of the present application, the bitmap object represents the original coding of the pixel points in a dot matrix or a dot matrix.
In this embodiment of the present application, image encoding data may be re-encoded according to the occurrence frequency of each pixel point in an image, that is, optionally, in some embodiments, the step "performing compression encoding on the original image encoding data according to a preset policy to obtain the target image and the image encoding data" includes:
determining the occurrence frequency of each pixel point in the image to be processed according to the original image coding data;
and carrying out compression coding on the original image coded data according to the occurrence frequency to obtain the target image and the image coded data.
The image data is recoded according to the occurrence frequency of the pixel points, and the pixel points with higher occurrence frequency can be set to be codes with shorter characters, so that the integral image coding data volume is reduced.
For example, a picture is generally formed by regularly arranging pixel points that are combined by three primary colors of RGB to form different colors, and if a picture is formed by three colors (black, white, and gray), it means that at least 2-bit binary bits are required for the three colors (for example: 00 means black, 01 means white, and 10 means gray), and if the picture is formed by 1000 pixel points, the size of the picture can be represented by at least 1000 × 2-2000-bit binary bits, which is fixed-length encoding.
In this embodiment of the application, the frequency of each color occurrence is obtained by scanning the frequency of the color value (each pixel point corresponds to one color value) contained in the picture in advance, the larger the frequency is, the fewer bits are used for representing the frequency, for example, 500 times of black pixels occur, 400 times of white pixel points occur, 100 times of gray pixel points occur, at this time, one bit of 0 can be used for representing black, one bit of 1 represents white, and two bits of 10 represent orange, so that the picture can be encoded by only using 1100 bits of binary bits which are 500 x 1+400 x 1+100 x 2.
In this embodiment of the present application, the reconstructing the encoded image data by constructing a huffman tree, that is, optionally, in some embodiments, the step "performing compression encoding on the original image encoded data according to the occurrence frequency to obtain the target image and the image encoded data" includes:
arranging the original codes corresponding to the pixel points according to the occurrence frequency, and constructing a Huffman tree according to the arranged original codes;
marking branches of the Huffman tree to obtain each code word of the original code;
and aiming at each pixel point, replacing the original codes of the pixel points according to the code words to obtain compressed image coded data and a target image.
The method includes the steps that a Huffman tree is constructed by arranging the occurrence frequency of each pixel point, each branch in the Huffman tree is marked again, each original code corresponds to a new code word, the code word corresponding to each pixel point in an image can be determined, and the code word of a shorter character is determined by corresponding the pixel point with higher occurrence frequency, so that the coding volume of the whole image can be reduced.
In this embodiment of the present application, the invalid codes in each pixel of the image may be filtered to reduce the volume of the image, that is, optionally, in some embodiments, the step "performing compression coding on the original image coded data according to a preset policy to obtain the target image and the image coded data" includes:
determining the original code of each pixel point in the image to be processed according to the original image coded data;
aiming at each original code, filtering invalid code characters in the original code to obtain a filtered target code;
and aiming at each pixel point, replacing the original code according to the target code of the pixel point to obtain the target image and the image coded data.
In the application embodiment, the invalid codes comprise codes corresponding to the transparency 0 in the pixel points, and because the codes with the filtering transparency 0 are not different in visual perception, the codes corresponding to the transparency 0 in the pixel point codes can be filtered and deleted, so that the image volume is further reduced.
102. And determining a region to be displayed of the target image according to the target display window.
The area to be displayed of the image is determined through the display window, so that the image area displayed in the display window meets the requirements of a user. For example, when the width and height of the target image are large, in order to ensure the definition requirement of image display, a part of regions can be selected from the image with large width and height for display according to the size of the display window; alternatively, when the user needs to enlarge the display image, the region to be displayed in the target image may be selected according to the size of the display window.
In the embodiment of the application, when the image is initially loaded, the origin coordinate of the display window coincides with the origin coordinate of the image, that is, the upper left corner of the image coincides with the upper left corner of the display window.
After the user slides in the display window, the image displayed in the display window may update the image content along with the sliding of the user, that is, optionally, in some embodiments, the step "determining the region to be displayed of the target image according to the target display window" includes:
determining an initial display area of the target image according to the target display window;
determining image sliding offset according to a user instruction;
determining a target area according to the initial display area and the image sliding offset;
and determining the target area as an area to be displayed of the target image.
The target area of the image can be determined according to the initial display area of the image and the sliding offset of the image, and the accuracy of image display is improved by taking the target area as the area to be displayed of the image.
103. And selecting target coded data from the image coded data according to the area to be displayed.
The target coded data is selected from the area to be displayed, so that the subsequent image loading of the area to be displayed is facilitated.
In this embodiment of the present application, the target encoded data may be determined according to the region coordinate information of the region to be displayed, that is, optionally, in some embodiments, the step "selecting the target encoded data from the image encoded data according to the region to be displayed" includes:
determining the area coordinate information of the area to be displayed according to the target image;
and selecting target coded data from the image coded data according to the region coordinate information.
The target coded data can be selected from the image coded data according to the area coordinate information by determining the area coordinate information of the area to be displayed.
104. And loading the target encoding data.
The target image to be displayed can be displayed by loading the target coded data. The block loading of the image coded data can be realized by loading the enqueue target coded data.
The image display method has the advantages that the target area is displayed in real time by loading the blocks of the area image when the user slides and previews the image, data size during image loading is reduced, and image display fluency is improved.
In the embodiment of the present application, when a picture is previewed, a locally cached compressed picture (target image) may be taken out, a picture file is read and written into input stream (input stream) picture stream data, a configuration function (such as Bitmap factor. decoded stream ()) is called to obtain a picture configuration object (such as Bitmap factor. operations), the picture configuration object is configured, Bitmap (Bitmap) memory multiplexing is started, and then a region decoder (Bitmap region decoder) is created for decoding an image of a picture specified region block.
Referring to fig. 4, fig. 4 is a schematic flow chart of image loading in the embodiment of the present application, which is specifically as follows:
121. receiving an image preview and viewing instruction of a user at an application layer, and reading a local compressed picture file stream (InputStream);
122. configuring an image configuration object bitmap factory.
123. And creating a region decoder, determining a region to be displayed of the image according to the initial display region and the image sliding offset, loading the encoded data corresponding to the image of the region to be displayed, and drawing the encoded data in the display window.
The method and the device have the advantages that the coded data of the to-be-displayed area of the image are loaded, block loading of the coded data of the image is achieved, the running memory space occupied by the coded data of other areas is released, the block loading is completed, and the fluency of the image loading is improved.
According to the method and the device, the area to be displayed of the image is determined according to the display window, the target coding data corresponding to the area to be displayed is loaded, the image data corresponding to the display window is loaded, the image data of the whole large image is prevented from being loaded, the occupation of an operating memory is reduced, and the smoothness of image loading is improved. By compressing the image before loading the image, the memory space occupied by the compressed image during storage is smaller, and the operating memory occupied by the image during loading is smaller.
In order to better implement the image display method of the present application, the present application also provides an image display device based on the image display method. The terms are the same as those in the image display method described above, and details of implementation can be referred to the description in the method embodiment.
Referring to fig. 5, fig. 5 is a schematic structural diagram of an image display device provided in the present application, wherein the image display device may include:
the acquiring module 201 is configured to acquire a target image to be displayed and image encoding data corresponding to the target image.
Wherein, in some embodiments of the present application, the apparatus further comprises a compression module, the compression module comprising:
the device comprises an acquisition unit, a processing unit and a processing unit, wherein the acquisition unit is used for acquiring original image coding data of an image to be processed;
and the compression unit is used for carrying out compression coding on the original image coded data according to a preset strategy to obtain the target image and the image coded data.
Wherein the compression unit includes:
the first determining subunit is used for determining the occurrence frequency of each pixel point in the image to be processed according to the original image coding data;
and the first compression subunit is used for carrying out compression coding on the original image coded data according to the occurrence frequency to obtain the target image and the image coded data.
Wherein the compression subunit is specifically configured to:
arranging the original codes corresponding to the pixel points according to the occurrence frequency, and constructing a Huffman tree according to the arranged original codes;
marking branches of the Huffman tree to obtain each code word of the original code;
and aiming at each pixel point, replacing the original codes of the pixel points according to the code words to obtain compressed image coded data and a target image.
Wherein the compression unit includes:
the second determining subunit is used for determining the original code of each pixel point in the image to be processed according to the original image coded data;
the filtering subunit is used for filtering invalid code characters in the original codes according to each original code to obtain filtered target codes;
and the second compression subunit is used for replacing the original code according to the target code of each pixel point to obtain the target image and the image coded data.
A determining module 202, configured to determine, according to the target display window, a to-be-displayed area of the target image.
Wherein the determining module 202 comprises:
the first determining unit is used for determining an initial display area of the target image according to the target display window;
a second determination unit configured to determine an image slide offset according to a user instruction;
a third determining unit, configured to determine a target area according to the initial display area and the image sliding offset;
and the fourth determining unit is used for determining the target area as the area to be displayed of the target image.
And the selecting module 203 is configured to select target encoded data from the image encoded data according to the region to be displayed.
Wherein, the selecting module 203 comprises:
a fifth determining unit, configured to determine, according to the target image, area coordinate information of the area to be displayed;
and the selecting unit is used for selecting target coded data from the image coded data according to the region coordinate information.
And the display module 204 is configured to load the target encoded data.
According to the embodiment of the application, the acquisition module 201 acquires a target image to be displayed and image coding data corresponding to the target image, then the determination module 202 determines a region to be displayed of the target image according to the size of a display window, then the selection module 203 selects the target coding data from the image coding data according to the region to be displayed, and finally the display module 204 loads the target coding data to realize loading display of the image of the region to be displayed.
According to the method and the device, the area to be displayed of the image is determined according to the display window, the target coding data corresponding to the area to be displayed are loaded, the loading of the image data corresponding to the display window is achieved, the loading of the image data of the whole large image is avoided, the occupation of an operating memory is reduced, and the fluency of image loading is improved. By compressing the image before loading the image, the memory space occupied by the compressed image during storage is smaller, and the operating memory occupied by the image during loading is smaller.
In addition, the present application also provides an electronic device, as shown in fig. 6, which shows a schematic structural diagram of the electronic device related to the present application, specifically:
the electronic device may include components such as a processor 401 of one or more processing cores, memory 402 of one or more computer-readable storage media, a power supply 403, and an input unit 404. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 6 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the processor 401 is a control center of the electronic device, connects various parts of the whole electronic device by various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 402 and calling data stored in the memory 402, thereby performing overall monitoring of the electronic device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by operating the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to use of the electronic device, and the like. Further, the memory 402 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 access to the memory 402.
The electronic device further comprises a power supply 403 for supplying power to the various components, and preferably, the power supply 403 is logically connected to the processor 401 through a power management system, so that functions of managing charging, discharging, and power consumption are realized through the power management system. The power supply 403 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The electronic device may further include an input unit 404, and the input unit 404 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the electronic device may further include a display unit and the like, which are not described in detail herein. Specifically, in this embodiment, the processor 401 in the electronic device loads an executable file corresponding to a process of one or more application programs into the memory 402 according to the following instructions, and the processor 401 runs the application programs stored in the memory 402, thereby implementing the steps in any image display method provided by the present application.
According to the method and the device, the area to be displayed of the image is determined according to the display window, the target coding data corresponding to the area to be displayed is loaded, the image data corresponding to the display window is loaded, the image data of the whole large image is prevented from being loaded, the occupation of an operating memory is reduced, and the smoothness of image loading is improved. By compressing the image before loading the image, the memory space occupied by the compressed image during storage is smaller, and the operating memory occupied by the image during loading is smaller.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium having stored thereon a computer program, which can be loaded by a processor to perform the steps of any of the image display methods provided herein.
Wherein the computer-readable storage medium may include: read Only Memory (ROM), Random Access Memory (RAM), magnetic or optical disks, and the like.
Since the instructions stored in the computer-readable storage medium can execute the steps in any image display method provided by the present application, the beneficial effects that can be achieved by any image display method provided by the present application can be achieved, which are detailed in the foregoing embodiments and will not be described herein again.
The foregoing detailed description has provided a method, an apparatus, an electronic device, and a storage medium for displaying an image, and the principles and embodiments of the present invention have been described herein with reference to specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for those skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. An image display method, comprising:
acquiring a target image to be displayed and image coding data corresponding to the target image;
determining a region to be displayed of the target image according to a target display window;
selecting target coded data from the image coded data according to the area to be displayed;
and loading the target encoding data.
2. The method according to claim 1, wherein before the obtaining of the target image to be displayed and the image encoding data corresponding to the target image, the method further comprises:
acquiring original image coding data of an image to be processed;
and carrying out compression coding on the original image coded data according to a preset strategy to obtain the target image and the image coded data.
3. The method according to claim 2, wherein the compression encoding the original image encoding data according to a preset strategy to obtain the target image and the image encoding data comprises:
determining the occurrence frequency of each pixel point in the image to be processed according to the original image coding data;
and carrying out compression coding on the original image coded data according to the occurrence frequency to obtain the target image and the image coded data.
4. The method according to claim 3, wherein said compression-encoding the original image encoding data according to the occurrence frequency to obtain the target image and the image encoding data comprises:
arranging the original codes corresponding to the pixel points according to the occurrence frequency, and constructing a Huffman tree according to the arranged original codes;
marking branches of the Huffman tree to obtain each code word of the original code;
and aiming at each pixel point, replacing the original codes of the pixel points according to the code words to obtain compressed image coded data and a target image.
5. The method according to claim 2, wherein the compression encoding the original image encoding data according to a preset strategy to obtain the target image and the image encoding data comprises:
determining the original code of each pixel point in the image to be processed according to the original image coded data;
aiming at each original code, filtering invalid code characters in the original code to obtain a filtered target code;
and aiming at each pixel point, replacing the original code according to the target code of the pixel point to obtain the target image and the image coded data.
6. The method of claim 1, wherein determining the area to be displayed of the target image according to the target display window comprises:
determining an initial display area of the target image according to the target display window;
determining image sliding offset according to a user instruction;
determining a target area according to the initial display area and the image sliding offset;
and determining the target area as an area to be displayed of the target image.
7. The method according to claim 1, wherein the selecting target coded data from the image coded data according to the area to be displayed comprises:
determining the area coordinate information of the area to be displayed according to the target image;
and selecting target coded data from the image coded data according to the region coordinate information.
8. An image display apparatus, comprising:
the device comprises an acquisition module, a display module and a display module, wherein the acquisition module is used for acquiring a target image to be displayed and image coding data corresponding to the target image;
the determining module is used for determining a to-be-displayed area of the target image according to the target display window;
the selecting module is used for selecting target coded data from the image coded data according to the area to be displayed;
and the display module is used for loading the target coded data.
9. An electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the image display method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the image display method according to any one of claims 1 to 7.
CN202111452510.9A 2021-12-01 2021-12-01 Image display method, image display device, electronic equipment and computer readable storage medium Pending CN114217758A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111452510.9A CN114217758A (en) 2021-12-01 2021-12-01 Image display method, image display device, electronic equipment and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111452510.9A CN114217758A (en) 2021-12-01 2021-12-01 Image display method, image display device, electronic equipment and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114217758A true CN114217758A (en) 2022-03-22

Family

ID=80699249

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111452510.9A Pending CN114217758A (en) 2021-12-01 2021-12-01 Image display method, image display device, electronic equipment and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN114217758A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686671A (en) * 2022-10-27 2023-02-03 北京城市网邻信息技术有限公司 Picture loading method and device and storage medium

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350923A (en) * 2008-09-03 2009-01-21 中国科学院上海技术物理研究所 Method for communication and indication of interactive iatrology image
CN103959246A (en) * 2012-08-22 2014-07-30 华为技术有限公司 Window image transmission method, display method, terminal, server and system
CN110084030A (en) * 2019-03-14 2019-08-02 咪咕文化科技有限公司 Verification method, device and computer readable storage medium based on picture validation code
CN110366048A (en) * 2019-07-19 2019-10-22 Oppo广东移动通信有限公司 Video transmission method, device, electronic equipment and computer readable storage medium
CN110750664A (en) * 2019-10-15 2020-02-04 腾讯科技(深圳)有限公司 Picture display method and device
CN111144156A (en) * 2018-11-06 2020-05-12 腾讯科技(深圳)有限公司 Image data processing method and related device
CN111161385A (en) * 2019-12-30 2020-05-15 北京奇艺世纪科技有限公司 Image rendering method and device, electronic equipment and storage medium
CN111277834A (en) * 2018-12-05 2020-06-12 三星电子株式会社 Apparatus and method for compressing data
CN111767819A (en) * 2020-06-23 2020-10-13 珠海格力电器股份有限公司 Image identification method and device, electronic equipment and computer readable medium
CN111836046A (en) * 2020-06-22 2020-10-27 腾讯科技(深圳)有限公司 Video encoding method and apparatus, electronic device, and computer-readable storage medium
CN111914834A (en) * 2020-06-18 2020-11-10 绍兴埃瓦科技有限公司 Image recognition method and device, computer equipment and storage medium
CN112511834A (en) * 2020-11-23 2021-03-16 西安万像电子科技有限公司 Encoding method, apparatus and storage medium
CN112633198A (en) * 2020-12-28 2021-04-09 浙江大华技术股份有限公司 Picture processing method and device, storage medium and electronic device
CN113220201A (en) * 2021-05-31 2021-08-06 上海御微半导体技术有限公司 Picture display method, device, equipment and storage medium
CN113727106A (en) * 2020-05-25 2021-11-30 腾讯科技(深圳)有限公司 Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and storage medium

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350923A (en) * 2008-09-03 2009-01-21 中国科学院上海技术物理研究所 Method for communication and indication of interactive iatrology image
CN103959246A (en) * 2012-08-22 2014-07-30 华为技术有限公司 Window image transmission method, display method, terminal, server and system
CN103959246B (en) * 2012-08-22 2017-03-08 华为技术有限公司 The transmission method of video in window, display packing, terminal, server and system
CN111144156A (en) * 2018-11-06 2020-05-12 腾讯科技(深圳)有限公司 Image data processing method and related device
CN111277834A (en) * 2018-12-05 2020-06-12 三星电子株式会社 Apparatus and method for compressing data
CN110084030A (en) * 2019-03-14 2019-08-02 咪咕文化科技有限公司 Verification method, device and computer readable storage medium based on picture validation code
CN110366048A (en) * 2019-07-19 2019-10-22 Oppo广东移动通信有限公司 Video transmission method, device, electronic equipment and computer readable storage medium
CN110750664A (en) * 2019-10-15 2020-02-04 腾讯科技(深圳)有限公司 Picture display method and device
CN111161385A (en) * 2019-12-30 2020-05-15 北京奇艺世纪科技有限公司 Image rendering method and device, electronic equipment and storage medium
CN113727106A (en) * 2020-05-25 2021-11-30 腾讯科技(深圳)有限公司 Video encoding method, video decoding method, video encoding device, video decoding device, electronic equipment and storage medium
CN111914834A (en) * 2020-06-18 2020-11-10 绍兴埃瓦科技有限公司 Image recognition method and device, computer equipment and storage medium
CN111836046A (en) * 2020-06-22 2020-10-27 腾讯科技(深圳)有限公司 Video encoding method and apparatus, electronic device, and computer-readable storage medium
CN111767819A (en) * 2020-06-23 2020-10-13 珠海格力电器股份有限公司 Image identification method and device, electronic equipment and computer readable medium
CN112511834A (en) * 2020-11-23 2021-03-16 西安万像电子科技有限公司 Encoding method, apparatus and storage medium
CN112633198A (en) * 2020-12-28 2021-04-09 浙江大华技术股份有限公司 Picture processing method and device, storage medium and electronic device
CN113220201A (en) * 2021-05-31 2021-08-06 上海御微半导体技术有限公司 Picture display method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686671A (en) * 2022-10-27 2023-02-03 北京城市网邻信息技术有限公司 Picture loading method and device and storage medium

Similar Documents

Publication Publication Date Title
CN111681167B (en) Image quality adjusting method and device, storage medium and electronic equipment
CN1856819B (en) System and method for network transmission of graphical data through a distributed application
JP5722761B2 (en) Video compression apparatus, image processing apparatus, video compression method, image processing method, and data structure of video compression file
US10440360B2 (en) Video processing system
WO2022257699A1 (en) Image picture display method and apparatus, device, storage medium and program product
CN113457160A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN111510718B (en) Method and system for improving compression ratio through inter-block difference of image file
CN109272449A (en) Image display method and device, computer installation and readable storage medium storing program for executing
CN111346378A (en) Game picture transmission method, device, storage medium and equipment
CN112929740A (en) Method, device, storage medium and equipment for rendering video stream
CN112714357A (en) Video playing method, video playing device, electronic equipment and storage medium
CN110049347B (en) Method, system, terminal and device for configuring images on live interface
CN113327303B (en) Image processing method, image processing device, computer equipment and storage medium
CN114217758A (en) Image display method, image display device, electronic equipment and computer readable storage medium
CN112991412B (en) Liquid crystal instrument sequence frame animation performance optimization method and liquid crystal instrument
CN110012338A (en) A kind of method, apparatus, computer equipment and storage medium showing barrage data
CN113822803A (en) Image super-resolution processing method, device, equipment and computer readable storage medium
US12008954B2 (en) Method and system for compressing Demura compensation value
CN115209147B (en) Camera video transmission bandwidth optimization method, device, equipment and storage medium
CN115293994B (en) Image processing method, image processing device, computer equipment and storage medium
CN115576513A (en) Target image display method, display device, electronic device, and storage medium
CN113938666B (en) Video data transmission method, device and storage medium based on key frames
CN110087072A (en) Image processing apparatus
US9317891B2 (en) Systems and methods for hardware-accelerated key color extraction
CN113473150B (en) Image processing method and device and computer readable storage device

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