CN106445502A - Image display method and apparatus - Google Patents

Image display method and apparatus Download PDF

Info

Publication number
CN106445502A
CN106445502A CN201610780169.2A CN201610780169A CN106445502A CN 106445502 A CN106445502 A CN 106445502A CN 201610780169 A CN201610780169 A CN 201610780169A CN 106445502 A CN106445502 A CN 106445502A
Authority
CN
China
Prior art keywords
image
bunch
size
display
bitmap
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
CN201610780169.2A
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610780169.2A priority Critical patent/CN106445502A/en
Publication of CN106445502A publication Critical patent/CN106445502A/en
Pending legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)

Abstract

The invention relates to an image display method and apparatus. The method comprises the steps of allocating a bitmap according to a fixed size by a slave system, wherein the size of the bitmap is a multiple of a least common multiple of the sizes of various images in the system; dividing the bitmap into clusters same in size according to the least common multiple, wherein the same cluster contains a plurality of images same in size, and a part used for image display in each cluster is called a slice; determining a corresponding slice used for displaying an image needed to be displayed according to the size of the image needed to be displayed; decoding the image needed to be displayed by utilizing a created bitmap used for image decoding; drawing the decoded image to the corresponding slice; and displaying an effective region in the drawn corresponding slice, wherein the effective region contains the image needed to be displayed. The frequency of allocating a big object from a Java stack can be greatly reduced, so that the junk collection frequency is reduced and the responsibility of a user interface is improved when more images can be displayed.

Description

Method for displaying image and device
Technical field
It relates to technical field of image processing, particularly relate to method for displaying image and device.
Background technology
In java applet in operating system (for example, android system), object can take Java heap.Bitmap (Bitmap) being usually big object, when there being great amount of images to need frequently switching display, decoding image can be frequently in Java heap Depositing distribution, this can frequently cause the garbage collection operations of Java heap, reduces the response of user interface.
A common solution for this problem is:Only show little parts of images on a user interface, reduce The occupancy of internal memory, reduces the generation of rubbish event.Further optimization way is when needing to show new image, reuses The allocated bitmap is decoded and shows, Android supports this mechanism.But this method brings new problem:Image Frequently reloading, Consumer's Experience is bad.
Content of the invention
For overcoming problem present in correlation technique, disclosure embodiment provides method for displaying image and device.
According to the first aspect of disclosure embodiment, provide a kind of method for displaying image, including:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the various images in described system The multiple of least common multiple of size;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch of receiving is multiple The identical image of size, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises described needs and shows The image showing.
Alternatively, the size of the described image needing display according to a width determines for showing the image that described needs show Respective slice, including:
Need the size of the image of display to calculate according to a width to cut needed for the image that described needs show for showing Piece;
Search belonging to described required section bunch.
Alternatively, the size of the described image needing display according to a width determines for showing the image that described needs show Respective slice, also include:
Do not find belonging to described required section bunch in the case of, distribute one new bunch, wherein, described new bunch of tool There is the respective slice for showing image that described needs show.
Alternatively, the size of the described image needing display according to a width determines for showing the image that described needs show Respective slice, also include:
In the case of cannot distributing one new bunch, distribute a new bitmap, wherein, described new bitmap have described accordingly Section belonging to bunch.
Alternatively, the size of the described image needing display according to a width determines for showing the image that described needs show Respective slice, also include:
In the case that the number of described bitmap reaches the upper limit, eliminate one be not currently displayed image bunch, and distribute One new bunch, wherein, the described new bunch of respective slice having for showing image that described needs show.
Alternatively, the effective coverage in the described respective slice that described display is finished, including:
When described system is android system, the effective coverage in the described respective slice that will be finished is signed in described On the painting canvas of android system.
According to the second aspect of disclosure embodiment, provide a kind of image display optimization device, including:
Distribution module, is configured to from system according to fixed size assignment bit map, and wherein, the size of described bitmap is described The multiple of the least common multiple of the size of the various images in system;
Divide module, be configured to according to described least common multiple, described bitmap is divided into equal-sized bunch, wherein, Same bunch accommodates the identical image of multiple size, and in each bunch, the part for showing image is referred to as section;
Determining module, is configured to need the size of the image of display to determine for showing that described needs shows according to a width The respective slice of image;
Decoder module, the described image needing display is entered by the bitmap being configured to, with being created for image decoding Row decoding;
Drawing module, is configured to decoded image is signed in described respective slice;
Display module, is display configured to the effective coverage in the described respective slice finished, wherein, described effective district Territory comprises the image that described needs show.
Alternatively, described determining module includes:
Calculating sub module, is configured to need the size of the image of display to calculate for showing described needs according to a width The required section of the image of display;
Search submodule, be configured to search belonging to described required section bunch.
Alternatively, described determining module is additionally configured to:
Do not find belonging to described required section bunch in the case of, distribute one new bunch, wherein, described new bunch of tool There is the respective slice for showing image that described needs show.
Alternatively, described determining module is additionally configured to:
In the case of cannot distributing one new bunch, distribute a new bitmap, wherein, described new bitmap have described accordingly Section belonging to bunch.
Alternatively, described determining module is additionally configured to:
In the case that the number of described bitmap reaches the upper limit, eliminate one be not currently displayed image bunch, and distribute One new bunch, wherein, the described new bunch of respective slice having for showing image that described needs show.
Alternatively, described display module is configured to:
When described system is android system, the effective coverage in the described respective slice that will be finished is signed in described On the painting canvas of android system.
According to the third aspect of disclosure embodiment, provide a kind of image display optimization device, including:
Processor;
For storing the memory of processor executable;
Wherein, described processor is configured to:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the various images in described system The multiple of least common multiple of size;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch of receiving is multiple The identical image of size, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises described needs and shows The image showing.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect:
Disclosure embodiment provides method for displaying image and device, by from system according to fixed size assignment bit map, Wherein, the size of bitmap is the multiple of the least common multiple of the size of the various images in system;By bitmap according to least common multiple Number is divided into equal-sized bunch, and wherein, same bunch accommodates the identical image of multiple size, be used for showing figure in each bunch The part of picture is referred to as section;The phase of the image that the size determination of the image according to a width needs display shows for showing needs Should cut into slices;The bitmap being created for image decoding is utilized to be decoded the image needing display;By decoded image Sign in respective slice;Effective coverage in the respective slice that display is finished, wherein, effective coverage comprises the figure that needs show Picture, can be greatly lowered the frequency from the big object of Java heap distribution, thus reduce the frequency of refuse collection, can show While more image, improve the response of user interface.And, on the premise of ensureing the response of user interface, can To show image as much as possible in user interface, it is to avoid the frequent loading of image in navigation process, improve efficiency, improve Consumer's Experience.
It should be appreciated that it is only exemplary and explanatory, not that above general description and details hereinafter describe The disclosure can be limited.
Brief description
Accompanying drawing herein is merged in specification and constitutes the part of this specification, shows the enforcement meeting the disclosure Example, and for explaining the principle of the disclosure together with specification.
Fig. 1 is the flow chart of the method for displaying image according to the disclosure one exemplary embodiment;
Fig. 2 is a part of flow chart of the method for displaying image according to disclosure another exemplary embodiment;
Fig. 3 is the block diagram of a kind of image display optimization device according to the disclosure one exemplary embodiment;
Fig. 4 is a part of frame of a kind of image display optimization device according to disclosure another exemplary embodiment Figure;
Fig. 5 is the block diagram of a kind of image display optimization device according to the disclosure one exemplary embodiment;
Fig. 6 is the block diagram of a kind of image display optimization device according to disclosure another exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Explained below relates to During accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with such as appended The example of the consistent apparatus and method of some aspects that described in detail in claims, the disclosure.
The disclosure is based on such consideration:In overwhelming majority application, the size of shown image is all fixing Several.In the case, when allowing the waste of a certain degree of internal memory, the least common multiple size of the size of these images is not special Not big, therefore can carry out the image display optimization in the disclosure.
Disclosure embodiment provides image display optimization technology, by from system according to fixed size assignment bit map, its In, the size of bitmap is the multiple of the least common multiple of the size of the various images in system;By bitmap according to least common multiple Being divided into equal-sized bunch, wherein, same bunch accommodates the identical image of multiple size, is used for showing image in each bunch Part be referred to as section;The size needing the image of display according to a width determines for showing the corresponding of image that needs show Section;The bitmap being created for image decoding is utilized to be decoded the image needing display;Decoded image is drawn To respective slice;Effective coverage in the respective slice that display is finished, wherein, effective coverage comprises the image that needs show, Frequency from Java heap distribution big object can be greatly lowered, thus reduce the frequency of refuse collection, can show more While many images, improve the response of user interface.And, on the premise of ensureing the response of user interface, permissible Show image as much as possible in user interface, it is to avoid the frequent loading of image in navigation process, improve efficiency, improve use Family is experienced.
Fig. 1 is the flow chart of the method for displaying image according to the disclosure one exemplary embodiment, the method include with Lower step S110, S120, S130, S140, S150 and S160:
In step s 110, from system according to fixed size assignment bit map, wherein, the size of bitmap is various in system The multiple of the least common multiple of the size of image.
In one embodiment, when system (for example, android system) assignment bit map, according to fixed size distribution, should The size of bitmap is the size at double of least common multiple size, it is possible to it is called page (Page).
In the step s 120, bitmap is divided into equal-sized bunch (Cluster) according to least common multiple, wherein, with One bunch accommodates the identical image of multiple size, and in each bunch, the part for showing image is referred to as cutting into slices (Slice).
In one embodiment, according to least common multiple size, bitmap being divided into one piece one piece, each block size is all Identical, it is referred to as bunch.In one embodiment, when being used for showing, can accommodate multiple image in each bunch, each image accounts for According to size be all identical, bunch size be the multiple of size of image, each is for showing that the part of image is referred to as cutting Piece.In one embodiment, different bunches, slice size can be different.Different size of section can be used for display difference The image of size.
In step s 130, the image that the size determination of the image according to a width needs display shows for showing needs Respective slice.
Fig. 2 shows the flow chart of step S130 in Fig. 1.As in figure 2 it is shown, step S130 include step S210 and S220.
In step S210, the size of the image of display is needed to calculate for showing the image that needs show according to a width Required section.
In step S220, search belonging to required section bunch.
In one embodiment, the size needing the image of display according to a width calculates for showing the figure that needs show The required section of picture, i.e. determine the size of section of display image, and belonging to this level of section bunch, in order to profit With the section display image in this bunch.
In one embodiment, step S130 also includes:Do not find belonging to required section bunch in the case of, point Joining one new bunch, wherein, new bunch has the respective slice for showing image that needs show.That is, suit the requirements the figure showing The section of the size of picture and affiliated bunch do not exist, therefore, by distribution one new bunch, enabling utilize in this new bunch Section display image.
In one embodiment, step S130 also includes:In the case of cannot distributing one new bunch, distribute a new position Figure, wherein, new bitmap have belonging to described respective slice bunch.That is, existing bitmap does not have space be allocated new bunch, therefore, By one new bitmap of distribution, in new bitmap, distribute one new bunch, enabling utilize cutting in new bunch in this new bitmap Piece shows image.
In one embodiment, step S130 also includes:In the case that the number of bitmap reaches the upper limit, eliminate one and work as Before do not show image bunch, and distribute one new bunch, wherein, new bunch has for showing cutting accordingly of image that needs show Piece.That is, in the case of not having space to distribute new bitmap, need to eliminate one be currently not used by bunch, and on this basis Distribute one new bunch, enabling utilize the section display image in this new bunch.
In one embodiment, it is necessary to during display piece image, calculate, according to image size, the section that use, look into Look for respective slice bunch, if it does not exist, then distribution one new bunch, if new bunch cannot be assigned to, then distribute a new page.When The number of page is when having arrived at the upper limit, then be not currently displayed bunch carrying out of image according to certain expired algorithms selection of caching Eliminate, and notify UI picture failure therein.
In step S140, the bitmap being created for image decoding is utilized to be decoded the image needing display.
In one embodiment, when decoding image, a section cannot be used directly for image decoding.System is (for example, Android) support to reuse bitmap decoding, if the internal memory that the memory size that bitmap takies should take more than image decoding Size, system can be decoded to use this bitmap.Therefore, it can create a bitmap being specifically designed to decoding.Consider To precondition:The image size of one application display is fixed several exactly, after this bitmap creates several times, and Jiu Huiyi Straight reuse is gone down, so, will not create frequently and discharge.Furthermore, it is also possible to when creating this bitmap for the first time, just wound Build the bitmap of maximum demand.
In step S150, decoded image is signed in respective slice.
In step S160, showing the effective coverage in the respective slice finished, wherein, effective coverage comprises needs and shows The image showing.
In one embodiment, step S160 includes:When system is android system, the respective slice that will be finished In effective coverage sign on the painting canvas of android system.
According to the method for displaying image of disclosure embodiment, by from system according to fixed size assignment bit map, wherein, position The size of figure is the multiple of the least common multiple of the size of the various images in system;Bitmap is divided into according to least common multiple Equal-sized bunch, wherein, same bunch accommodates the identical image of multiple size, for showing the part of image in each bunch It is referred to as section;The respective slice of the image that the size determination of the image according to a width needs display shows for showing needs; The bitmap being created for image decoding is utilized to be decoded the image needing display;Decoded image is signed in accordingly Section;Effective coverage in the respective slice that display is finished, wherein, effective coverage comprises the image that needs show, Neng Gou great Amplitude reduction is from the frequency of the big object of Java heap distribution, thus reduces the frequency of refuse collection, can show more image While, improve the response of user interface.And, on the premise of ensureing the response of user interface, can be user Interface display image as much as possible, it is to avoid the frequent loading of image in navigation process, improves efficiency, improves user's body Test.
Fig. 3 is the block diagram of the image display optimization device according to the disclosure one exemplary embodiment, and this device includes Hereinafter distribute module the 310th, to divide module the 320th, determining module the 330th, decoder module and the 340th, paint module 350 and display module 360.
Distribution module 310 is configured to from system according to fixed size assignment bit map, and wherein, the size of bitmap is in system The multiple of least common multiple of size of various images.
In one embodiment, when system (for example, android system) assignment bit map, according to fixed size distribution, should The size of bitmap is the size at double of least common multiple size, it is possible to it is called page (Page).
Divide module 320 to be configured to according to least common multiple, bitmap is divided into equal-sized bunch (Cluster), its In, same bunch accommodates the identical image of multiple size, and in each bunch, the part for showing image is referred to as section (Slice).
In one embodiment, according to least common multiple size, bitmap being divided into one piece one piece, each block size is all Identical, it is referred to as bunch.In one embodiment, when being used for showing, can accommodate multiple image in each bunch, each image accounts for According to size be all identical, bunch size be the multiple of size of image, each is for showing that the part of image is referred to as cutting Piece.In one embodiment, different bunches, slice size can be different.Different size of section can be used for display difference The image of size.
Determining module 330 is configured to need the size of the image of display to determine for showing what needs showed according to a width The respective slice of image.
Fig. 4 shows the block diagram of the determining module 330 in Fig. 3.As shown in Figure 4, determining module 330 includes calculating sub module 410 and search submodule 420.
Calculating sub module 410 is configured to need the size of the image of display to calculate for showing that needs show according to a width The required section of the image showing.
Search submodule 420 be configured to search belonging to required section bunch.
In one embodiment, the size needing the image of display according to a width calculates for showing the figure that needs show The required section of picture, i.e. determine the size of section of display image, and belonging to this level of section bunch, in order to profit With the section display image in this bunch.
In one embodiment, determining module 330 is additionally configured to:Do not find belonging to required section bunch feelings Under condition, distributing one new bunch, wherein, new bunch has the respective slice for showing image that needs show.That is, suit the requirements aobvious The section of the size of the image showing and affiliated bunch do not exist, therefore, by distribution one new bunch, enabling utilize this new Section display image in bunch.
In one embodiment, determining module 330 is additionally configured to:In the case of cannot distributing one new bunch, distribution One new bitmap, wherein, new bitmap have belonging to described respective slice bunch.That is, existing bitmap does not have space allocated new Bunch, therefore, by one new bitmap of distribution, in new bitmap, distribute one new bunch, enabling utilize in this new bitmap is new Section display image in bunch.
In one embodiment, determining module 330 is additionally configured to:In the case that the number of bitmap reaches the upper limit, wash in a pan Eliminate one be not currently displayed image bunch, and distribute one new bunch, wherein, new bunch has for showing the image that needs show Respective slice.That is, do not have space distribute new bitmap in the case of, need eliminate one be currently not used by bunch, and One new bunch is distributed on the basis of this, enabling utilize the section display image in this new bunch.
In one embodiment, it is necessary to during display piece image, calculate, according to image size, the section that use, look into Look for respective slice bunch, if it does not exist, then distribution one new bunch, if new bunch cannot be assigned to, then distribute a new page.When The number of page is when having arrived at the upper limit, then be not currently displayed bunch carrying out of image according to certain expired algorithms selection of caching Eliminate, and notify UI picture failure therein.
The image needing display is carried out by the bitmap that decoder module 340 is configured to, with being created for image decoding Decoding.
In one embodiment, when decoding image, a section cannot be used directly for image decoding.System is (for example, Android) support to reuse bitmap decoding, if the internal memory that the memory size that bitmap takies should take more than image decoding Size, system can be decoded to use this bitmap.Therefore, it can create a bitmap being specifically designed to decoding.Consider To precondition:The image size of one application display is fixed several exactly, after this bitmap creates several times, and Jiu Huiyi Straight reuse is gone down, so, will not create frequently and discharge.Furthermore, it is also possible to when creating this bitmap for the first time, just wound Build the bitmap of maximum demand.
Drawing module 350 is configured to decoded image is signed in respective slice.
Display module 360 is display configured to the effective coverage in the respective slice finished, and wherein, effective coverage comprises Need the image of display.
In one embodiment, display module 360 is configured to:When system is android system, the phase that will be finished Effective coverage in should cutting into slices is signed on the painting canvas of android system.
Image display optimization device according to disclosure embodiment, by distribution module, is configured to from system according to admittedly Sizing assignment bit map, wherein, the size of bitmap is the multiple of the least common multiple of the size of the various images in system;Divide Module, is configured to according to least common multiple, bitmap is divided into equal-sized bunch, and wherein, same bunch accommodates multiple size Identical image, in each bunch, the part for showing image is referred to as section;Determining module, is configured to according to width need The respective slice of the image that the size determination of image to be shown shows for showing needs;Decoder module, is configured to, with The image needing display is decoded by the bitmap being created for image decoding;Drawing module, is configured to after decoding Image sign in respective slice;Display module, is display configured to the effective coverage in the respective slice finished, wherein, to have Effect region comprises the image that needs show, frequency from Java heap distribution big object can be greatly lowered, thus reduce rubbish The frequency that rubbish is collected, while can showing more image, improves the response of user interface.And, ensureing user On the premise of the response at interface, image as much as possible can be shown in user interface, it is to avoid the frequency of image in navigation process Numerous loading, improves efficiency, improves Consumer's Experience.
An embodiment according to the disclosure, provides a kind of image display optimization device, it is characterised in that include:
Processor;
For storing the memory of processor executable;
Wherein, processor is configured to:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the various images in described system The multiple of least common multiple of size;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch of receiving is multiple The identical image of size, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises described needs and shows The image showing.
Fig. 5 is the block diagram of a kind of image display optimization device according to the disclosure one exemplary embodiment.For example, scheme As display optimization device 1000 can be application program, it is also possible to be mobile device, such as mobile phone, computer, digital broadcasting Terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc..
With reference to Fig. 5, device 1000 can include following one or more assembly:Process assembly 1002, memory 1004, electricity Source component 1006, multimedia groupware 1008, audio-frequency assembly 1010, the interface 1012 of input/output (I/O), sensor cluster 1014, and communications component 1016.
Process assembly 1002 and generally control the integrated operation of device 1000, such as with display, call, data communication, The operation that camera operation and record operation are associated.Process assembly 1002 and can include that one or more processor 1020 performs Instruction, to complete all or part of step of above-mentioned method.Additionally, process assembly 1002 can include one or more mould Block, it is simple to process between assembly 1002 and other assemblies is mutual.For example, process assembly 1002 and can include multi-media module, With facilitate multimedia groupware 1008 and process between assembly 1002 mutual.
Memory 1004 is configured to store various types of data to support the operation at device 1000.These data Example includes any application program or the instruction of method for operation on device 1000, contact data, telephone book data, Message, image, video etc..Memory 1004 can by any kind of volatibility or non-volatile memory device or they Combination realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), erasable can Program read-only memory (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash memory Reservoir, disk or CD.
The various assembly that power supply module 1006 is device 1000 provides electric power.Power supply module 1006 can include power management System, one or more power supplys, and other generate, manage and distribute, with for device 1000, the assembly that electric power is associated.
Multimedia groupware 1008 includes the screen of one output interface of offer between described device 1000 and user.? In some embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, Screen may be implemented as touch-screen, to receive the input signal from user.Touch panel includes that one or more touch passes Sensor is to sense touch, to slide and the gesture on touch panel.Described touch sensor can not only sense touch or slide dynamic The border made, but also the duration that detection touches to described or slide is related and pressure.In certain embodiments, many Media component 1008 includes a front-facing camera and/or post-positioned pick-up head.When device 1000 is in operator scheme, such as shooting mould When formula or video mode, front-facing camera and/or post-positioned pick-up head can receive the multi-medium data of outside.Each preposition shooting Head and post-positioned pick-up head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 1010 is configured to output and/or input audio signal.For example, audio-frequency assembly 1010 includes a wheat Gram wind (MIC), when device 1000 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone quilt It is configured to receive external audio signal.The audio signal being received can be further stored at memory 1004 or via communication Assembly 1016 sends.In certain embodiments, audio-frequency assembly 1010 also includes a loudspeaker, is used for exporting audio signal.
I/O interface 1012 provides interface, above-mentioned peripheral interface module for processing between assembly 1002 and peripheral interface module Can be keyboard, put striking wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and Locking press button.
Sensor cluster 1014 includes one or more sensor, for providing the state of various aspects to comment for device 1000 Estimate.For example, what sensor cluster 1014 can detect device 1000 opens/closed mode, the relative positioning of assembly, such as institute Stating the display that assembly is device 1000 and keypad, sensor cluster 1014 can also detect device 1000 or device 1,000 1 The position of individual assembly changes, and user is presence or absence of with what device 1000 contacted, device 1000 orientation or acceleration/deceleration and dress Put the temperature change of 1000.Sensor cluster 1014 can include proximity transducer, is configured to do not having any physics The existence of detection neighbouring object during contact.Sensor cluster 1014 can also include optical sensor, as CMOS or ccd image sense Device, for using in imaging applications.In certain embodiments, this sensor cluster 1014 can also include acceleration sensing Device, gyro sensor, Magnetic Sensor, pressure sensor or temperature sensor.
Communications component 1016 is configured to facilitate the communication of wired or wireless mode between device 1000 and other equipment.Dress Put 1000 and can access wireless network based on communication standard, such as WiFi, 2G or 3G, or combinations thereof.Exemplary at one In embodiment, broadcast singal or broadcast that communications component 1016 receives from external broadcasting management system via broadcast channel are related Information.In one exemplary embodiment, described communications component 1016 also includes near-field communication (NFC) module, to promote short distance Communication.For example, can be based on RF identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 1000 can be by one or more application specific integrated circuits (ASIC), numeral Signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components realize, are used for performing said method.
In the exemplary embodiment, a kind of non-transitory computer-readable recording medium including instruction, example are additionally provided As included the memory 1004 of instruction, above-mentioned instruction can be performed by the processor 1020 of device 1000 to complete said method.Example If, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, soft Dish and optical data storage devices etc..
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by the process of mobile terminal When device performs so that device is able to carry out a kind of method for displaying image, and the method includes:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the various images in described system The multiple of least common multiple of size;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch of receiving is multiple The identical image of size, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises described needs and shows The image showing.
Fig. 6 is the block diagram of a kind of image display optimization device according to disclosure another exemplary embodiment.For example, Device 1100 may be provided in a server.With reference to Fig. 6, device 1100 includes processing assembly 1122, and it farther includes one Individual or multiple processors, and by the memory resource representated by memory 1132, can be held by processing assembly 1122 for storage The instruction of row, such as application program.In memory 1132, the application program of storage can include one or more each The individual module corresponding to one group of instruction.It is configured to perform instruction, to perform said method additionally, process assembly 1122.
Device 1100 can also include a power supply module 1126 be configured to perform device 1100 power management, one Wired or wireless network interface 1150 is configured to be connected to device 1100 network, and input and output (I/O) interface 1158.Device 1100 can operate based on the operating system being stored in memory 1132, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM or similar.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is by the processor of server During execution so that server is able to carry out a kind of method for displaying image, and the method includes:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the various images in described system The multiple of least common multiple of size;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch of receiving is multiple The identical image of size, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises described needs and shows The image showing.
Those skilled in the art, after considering specification and putting into practice disclosure disclosed herein, will readily occur to its of the disclosure Its embodiment.The application is intended to any modification, purposes or the adaptations of the disclosure, these modification, purposes or Person's adaptations is followed the general principle of the disclosure and includes the undocumented common knowledge in the art of the disclosure Or conventional techniques means.Description and embodiments is considered only as exemplary, and the true scope of the disclosure and spirit are by following Claim is pointed out.
It should be appreciated that the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and And various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only limited by appended claim.

Claims (13)

1. a method for displaying image, it is characterised in that include:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the big of the various images in described system The multiple of little least common multiple;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch accommodates multiple size Identical image, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises what described needs showed Image.
2. method according to claim 1, it is characterised in that the size of the described image needing display according to a width determines For showing the respective slice of image that described needs show, including:
The size of image of display is needed to calculate the required section for showing image that described needs show according to a width;
Search belonging to described required section bunch.
3. method according to claim 2, it is characterised in that the size of the described image needing display according to a width determines For showing the respective slice of image that described needs show, also include:
Do not find belonging to described required section bunch in the case of, distribute one new bunch, wherein, described new bunch has use Respective slice in the described image needing display of display.
4. method according to claim 3, it is characterised in that the size of the described image needing display according to a width determines For showing the respective slice of image that described needs show, also include:
In the case of cannot distributing one new bunch, distributing a new bitmap, wherein, described new bitmap has described respective slice Belonging to bunch.
5. method according to claim 4, it is characterised in that the size of the described image needing display according to a width determines For showing the respective slice of image that described needs show, also include:
In the case that the number of described bitmap reaches the upper limit, eliminate one be not currently displayed image bunch, and distribute one New bunch, wherein, the described new bunch of respective slice having for showing image that described needs show.
6. method according to claim 1, it is characterised in that effective in the described respective slice that described display is finished Region, including:
When described system is android system, the effective coverage in the described respective slice that will be finished is signed in described On the painting canvas of android system.
7. an image display optimization device, it is characterised in that include:
Distribution module, is configured to from system according to fixed size assignment bit map, and wherein, the size of described bitmap is described system In the multiple of least common multiple of size of various images;
Divide module, be configured to according to described least common multiple, described bitmap is divided into equal-sized bunch, wherein, same Individual bunch accommodates the identical image of multiple size, and in each bunch, the part for showing image is referred to as section;
Determining module, is configured to need the size of the image of display to determine for showing the figure that described needs show according to a width The respective slice of picture;
Decoder module, the described image needing display is solved by the bitmap being configured to, with being created for image decoding Code;
Drawing module, is configured to decoded image is signed in described respective slice;
Display module, is display configured to the effective coverage in the described respective slice finished, and wherein, described effective coverage is wrapped Containing the described image needing display.
8. device according to claim 7, it is characterised in that described determining module includes:
Calculating sub module, is configured to need the size of the image of display to calculate for showing that described needs shows according to a width The required section of image;
Search submodule, be configured to search belonging to described required section bunch.
9. device according to claim 8, it is characterised in that described determining module is additionally configured to:Do not finding Belonging to described required section bunch in the case of, distribute one new bunch, wherein, described new bunch has for showing that described needs are aobvious The respective slice of the image showing.
10. device according to claim 9, it is characterised in that described determining module is additionally configured to:
In the case of cannot distributing one new bunch, distributing a new bitmap, wherein, described new bitmap has described respective slice Belonging to bunch.
11. devices according to claim 10, it is characterised in that described determining module is additionally configured to:
In the case that the number of described bitmap reaches the upper limit, eliminate one be not currently displayed image bunch, and distribute one New bunch, wherein, the described new bunch of respective slice having for showing image that described needs show.
12. devices according to claim 7, it is characterised in that described display module is configured to:
When described system is android system, the effective coverage in the described respective slice that will be finished is signed in described On the painting canvas of android system.
13. 1 kinds of image display optimization devices, it is characterised in that include:
Processor;
For storing the memory of processor executable;
Wherein, described processor is configured to:
From system according to fixed size assignment bit map, wherein, the size of described bitmap is the big of the various images in described system The multiple of little least common multiple;
According to described least common multiple, described bitmap is divided into equal-sized bunch, and wherein, same bunch accommodates multiple size Identical image, in each bunch, the part for showing image is referred to as section;
The respective slice of the image that the size determination of the image according to a width needs display shows for showing described needs;
The bitmap being created for image decoding is utilized to be decoded the described image needing display;
Decoded image is signed in described respective slice;
Effective coverage in the described respective slice that display is finished, wherein, described effective coverage comprises what described needs showed Image.
CN201610780169.2A 2016-08-30 2016-08-30 Image display method and apparatus Pending CN106445502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610780169.2A CN106445502A (en) 2016-08-30 2016-08-30 Image display method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610780169.2A CN106445502A (en) 2016-08-30 2016-08-30 Image display method and apparatus

Publications (1)

Publication Number Publication Date
CN106445502A true CN106445502A (en) 2017-02-22

Family

ID=58090347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610780169.2A Pending CN106445502A (en) 2016-08-30 2016-08-30 Image display method and apparatus

Country Status (1)

Country Link
CN (1) CN106445502A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107743A (en) * 2023-01-12 2023-05-12 北京麟卓信息科技有限公司 Bitmap scaling rendering optimization method based on object dynamic migration

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676906A (en) * 2008-09-18 2010-03-24 中兴通讯股份有限公司 Method of managing memory database space by using bitmap
WO2014047050A1 (en) * 2012-09-20 2014-03-27 Google Inc. Fast, dynamic cache packing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101676906A (en) * 2008-09-18 2010-03-24 中兴通讯股份有限公司 Method of managing memory database space by using bitmap
WO2014047050A1 (en) * 2012-09-20 2014-03-27 Google Inc. Fast, dynamic cache packing

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CASUAL: "Android:Bitmap Memory Management", 《HTTP://RUCHITSHARMA.BLOGSPOT.COM/2013/04/ANDROID-BITMAP-MEMORY-MANAGEMENT.HTML》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116107743A (en) * 2023-01-12 2023-05-12 北京麟卓信息科技有限公司 Bitmap scaling rendering optimization method based on object dynamic migration

Similar Documents

Publication Publication Date Title
CN105630411B (en) EMS memory management process and device
CN110515709A (en) Task scheduling system, method, apparatus, electronic equipment and storage medium
CN104536783B (en) Headspace method to set up and device
CN107291626B (en) Data storage method and device
CN104156236A (en) Storage space saving method and device
CN103916468B (en) Method for upgrading system, terminal, server and upgrade-system
CN105069073A (en) Contact information recommendation method and device
CN106775298A (en) The processing method and processing device of sectional drawing
CN105828145A (en) Interaction method and interaction device
CN104679599A (en) Application program duplicating method and device
CN104299001A (en) Photograph album generating method and device
CN103577097A (en) Terminal and handwriting sharing method thereof
CN107193653A (en) Method for allocating bandwidth resources, device and storage medium
CN109254849A (en) The operation method and device of application program
CN106066770A (en) Memory space management and device
CN106648730A (en) Processing method and device of abnormal application
CN107741869A (en) The startup method, apparatus and terminal device of application program
CN104298573A (en) Mobile terminal and control method thereof
CN104503690A (en) Arrangement method and device for application icons
CN104461348A (en) Method and device for selecting information
CN104636170A (en) Application acquiring method and device and electronic device
CN102685322A (en) Mobile terminal and controlling method thereof
CN104407981B (en) EMS memory management process and device
CN104050236B (en) Web site contents update reminding method, server and client side
CN106021072A (en) Information display method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20170222

RJ01 Rejection of invention patent application after publication