CN107608731A - A kind of picture loading method and device - Google Patents

A kind of picture loading method and device Download PDF

Info

Publication number
CN107608731A
CN107608731A CN201710831024.5A CN201710831024A CN107608731A CN 107608731 A CN107608731 A CN 107608731A CN 201710831024 A CN201710831024 A CN 201710831024A CN 107608731 A CN107608731 A CN 107608731A
Authority
CN
China
Prior art keywords
picture
needing
load
wide
new
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
CN201710831024.5A
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.)
Alibaba China Co Ltd
Original Assignee
Guangzhou Youshi Network 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 Guangzhou Youshi Network Technology Co Ltd filed Critical Guangzhou Youshi Network Technology Co Ltd
Priority to CN201710831024.5A priority Critical patent/CN107608731A/en
Publication of CN107608731A publication Critical patent/CN107608731A/en
Pending legal-status Critical Current

Links

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The invention provides a kind of picture loading method and device.Methods described includes:When the wide and high size for the picture for needing to load, which exceedes, is used to show the wide and high size in view display area domain of the picture, the wide and high equal sized new picture of wide and high size and the view display area domain is intercepted from the picture for needing to load and the new picture is drawn in the view, monitoring shows the touch event of the view of the new picture, obtain the change in location of the new picture movement in real time when user is sliding the new picture of display on the view and change in location information is converted into the Rect coordinates in the picture for needing to load, the picture region for needing to intercept is calculated in the wide and high size range of the picture for needing to load accordingly;According to the data of calculating the corresponding picture region of real-time interception and the picture that real-time rendering is intercepted in the view on the picture that loads are needed described.

Description

A kind of picture loading method and device
Technical field
The present invention relates to picture Processing Technique field, in particular to a kind of picture loading method and device.
Background technology
The memory management of Android (Android) platform is always a comparison stubborn problem.Although development language Java There is automatic GC (Garbage Collection (garbage reclamation)) mechanism, the space of rubbish occupancy, but Android can be discharged The program code for largely using c, c++ language development under platform also be present, internal memory is exploitation for c, c++ developer Personnel assignment, it is necessary to it is internal deposit into row safeguard and release.If developer is incorrect to Memory Allocation and afterwards unclear manually Remove, frequently can lead to RAM leakage.
And the loading of picture more likely runs into memory bottleneck in android system.Although by using picture compression The various caching mechanisms such as method or LruCache avoid image data committed memory too much, but sometimes user opens The picture to be shown is very big, such as picture size, in more than 4M, if being loaded directly into such picture, most of situation can cause intelligence The RAM leakage of energy mobile phone.Further, since the screen size of intelligent mobile terminal is limited, such as also selling in the market 5.0 inches or the smart mobile phone of more the small screen, when showing original image, the especially view in terminal screen on a terminal screen When original image is shown in viewing area, it is possible to which the wide and high size for the picture for occurring to need to load, which exceedes, to be used to show the figure The wide and high size in the view display area domain of piece, i.e. view display area domain can not show the content of whole original image, now such as Fruit is not handled especially and rendering and drawing for original image is performed directly on view, also easily causes the interior of smart mobile phone Deposit leakage.
Therefore a kind of new picture loading method is needed to reduce memory consumption.
The content of the invention
It is an object of the invention to provide a kind of picture loading method and device, to improve above mentioned problem.
First embodiment of the invention provides a kind of picture loading method, and it includes:
When the wide and high size for the picture for needing to load exceedes the wide and high of the view display area domain for being used for showing the picture During size, wide and high size is intercepted from the picture for needing to load and the width and height in the view display area domain are equal sized New picture and draw the new picture in the view, the wherein center of the new picture and the picture for needing to load Center is identical and records Rect coordinate of the new picture of interception in the picture for needing to load;
Monitoring shows the touch event of the view of the new picture, when user slides the new of display on the view The change in location of the new picture movement is obtained during picture in real time and change in location information is converted into the figure for needing to load The Rect coordinates of piece, the picture region for needing to intercept is calculated in the wide and high size range of the picture for needing to load accordingly Domain;
According to the data of calculating the corresponding picture region of real-time interception is needed on the picture that loads described and described The picture that real-time rendering is intercepted in view.
Wherein, the picture size for needing to load is prejudged, when the picture size for needing to load exceeds predetermined threshold value When by compressing processing first to reduce the size of the picture.
Wherein, the wide and high size of the picture is obtained in the case where not giving the picture storage allocation for needing to load.
Wherein, the picture for needing to load is set previously according to the memory size of used mobile terminal device Corresponding definition.
Wherein, when calculating the picture region for needing to intercept by BitmapRegionDecoder.decodeRegion side Method is realized.
Second embodiment of the invention provides a kind of picture loading device, and it includes:
Dimension of picture acquiring unit, for obtaining the wide and high size for the picture for needing to load;
First picture region intercepts and drawing unit, for being used to show when the wide and high size for the picture for needing to load exceedes When showing the wide and high size in the view display area domain of the picture, wide and high size and institute are intercepted from the picture for needing to load State the wide and high equal sized new picture in view display area domain and the new picture is drawn in the view, wherein the new figure The center of piece is identical with the center of the picture for needing to load and records the new picture of interception in the figure for needing to load The Rect coordinates of piece;
Touch event monitors and processing unit, for monitoring the touch event for the view for showing the new picture, when User obtains the change in location of new picture movement when sliding the new picture of display on the view and by change in location in real time Information is converted into the Rect coordinates in the picture for needing to load, accordingly in the wide and high size of the picture for needing to load In the range of calculate and need the picture region that intercepts;
Second picture region intercepts and drawing unit, for the data according to calculating it is described need it is real on the picture that loads When intercept corresponding picture region and real-time rendering is intercepted in the view picture.
Wherein, the dimension of picture acquiring unit is used in the case of not to the picture storage allocation for needing to load Obtain the wide and high size of the picture.
Wherein, in addition to:Picture pretreatment unit, it is used for:
The picture size for needing to load is prejudged, is passed through when the picture size for needing to load exceeds predetermined threshold value Compression is handled first to reduce the size of the picture;
The corresponding of the picture for needing to load is set previously according to the memory size of used mobile terminal device Definition.
Wherein, the touch event monitoring and processing unit pass through BitmapRegionDecoder.decodeRegion side Method needs the picture region that intercepts to calculate.
Third embodiment of the invention provides a kind of storage device, wherein be stored with a plurality of instruction, the instruction be suitable to by Processor loads and performs method as in the first embodiment or the first embodiment combines described side with preferred embodiment Method.
It is big by the internal memory according to the intelligent mobile terminal equipment used according to the picture loading method and device of the present invention It is small to take different display strategies, the partial picture content of loaded and displayed original image, watched by the slip gesture of user Complete original image content, even if the thus larger picture of loading data volume, such as more than more than 1M, or even more than 4M's are big During picture, occupancy and the consumption of internal memory can be also reduced, and improving the big picture of loading causes EMS memory occupation excessive caused Problem, such as RAM leakage or terminal operating speed are slow.
Brief description of the drawings
Fig. 1 is the flow chart for the picture loading method that first embodiment of the invention provides;
Fig. 2 is the schematic block diagram for the picture loading device that second embodiment of the invention provides.
Embodiment
Below in conjunction with the embodiment of the present invention and accompanying drawing, the technical scheme in the embodiment of the present invention is carried out clear, complete Ground describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.Generally herein The component of the embodiment of the present invention described and illustrated in place's accompanying drawing can be configured to arrange and design with a variety of.Therefore, The detailed description of the embodiments of the invention to providing in the accompanying drawings is not intended to limit the model of claimed invention below Enclose, but be merely representative of the selected embodiment of the present invention.Based on embodiments of the invention, those skilled in the art are not making The every other embodiment obtained on the premise of creative work, belongs to the scope of protection of the invention.
Fig. 1 is the flow chart for the picture loading method that first embodiment of the invention provides.As shown in figure 1, the figure of the present invention Piece loading method includes:
S1:When the wide and high size of picture for needing to load exceed the width in the view display area domain for being used for showing the picture with During high size, wide and high size and the wide and high size phase in the view display area domain are intercepted from the picture for needing to load Deng new picture and draw in the view the new picture, the wherein center of the new picture and the picture for needing to load Center it is identical and record the new picture of interception in the Rect coordinates of picture for needing to load.
With the definition more and more higher of camera entrained by intelligent mobile terminal, the photo shot using the camera Increasing, a usual photo is sized to can be in more than 3M, even more than in more than 1M, the higher photo of definition 4M.Many websites, especially show that the website for the shooting works that shutterbugs upload often provides the photo of original size, And shutterbugs are to shoot more preferable works, often using high pixel camera lens, such as the mirror of 20,000,000 pixels or higher pixel Head.Often very big using the photo of high pixel lens shooting, the photo more than 3M or 4M sizes is very common, is not being carried out Size reduction handles and uploads to website, and the operation characteristic of these websites is to provide original photo (picture), then user makes This kind of website is logged in when opening the picture that the website provides with intelligent mobile terminal (such as smart mobile phone), can be largely in consumption Deposit, it is easy to cause the RAM leakage of intelligent mobile terminal.
Additionally, it is provided website or the APP of the e-book online reading of animation content, its animation electronic chart provided online Book is substantially picture format, and the data of this kind of picture are often larger, and user uses intelligent mobile terminal (such as smart mobile phone) Log in when provided animation e-book is opened in this kind of website or read APP opening animations using the associated electrical book of installation During e-book, internal memory also can be largely consumed, it is easy to cause the RAM leakage of intelligent mobile terminal.
In addition to above-mentioned image data amount is excessive, even if the image data amount that needs load is less big, such as in 1M Within, even hundreds of K sizes, but because the screen size of intelligent mobile terminal is limited, such as in the market also in pin The smart mobile phone of 5.0 inches or more the small screen is sold, when showing original image, especially regarding in terminal screen on a terminal screen When showing original image in figure viewing area, even if needing the original image that loads within 1M, even hundreds of K sizes, Occur that the wide and high size for the picture that needs load exceedes the wide and high size in the view display area domain for being used to show the picture Situation occur, the let alone big picture of the example above, such as data volume is in more than 1M big picture, even 3 or 4M with On super large picture.If without data volume compression reduction processing, show that the wide and high size of this kind of picture often surpasses Cross for show the picture view display area domain wide and high size, or beyond intelligent mobile terminal screen can viewing area The wide and high size in domain.
Technical scheme is directed to the above situation, and the wide and high size for the picture for especially needing to load, which exceedes, to be used for When showing the wide and high size in the view display area domain of the picture, needs are reduced by the way of loading section image content and are added The data volume for the picture for carrying and drawing.
Specifically, when the wide and high size for the picture for needing to load exceedes the view display area domain for being used for showing the picture During wide and high size, the wide and high chi of wide and high size and the view display area domain is intercepted from the picture for needing to load Very little equal new picture and the new picture is drawn in the view, wherein the center of the new picture needs what is loaded with described The center of picture is identical.In other words, the central point around the original image for needing to load intercepts wide and high size and institute The wide and high equal sized picture region in view display area domain is stated as new picture, this allows for the center of the new picture and institute The center for stating the original image for needing to load is identical;Also, the new picture is drawn in the view, to be shown in the view The new image content of interception is shown in region.
The method of interception picture can use method well known in the art, such as intent.putExtra () method,
intent.setData(Uri.fromFile(mFile));// obtain original image data
intent.putExtra("aspectX",width);// crop box ratio
intent.putExtra("aspectY",height);
intent.putExtra("outputX",width);// output picture size
intent.putExtra("outputY",height);
Meanwhile record Rect coordinate of the new picture in the picture for needing to load of interception.
It can be realized using the respective function under Rect classes.0 using the upper left corner of original image as Rect coordinate systems Point (origin), establishes Rect coordinates.Rect coordinate of the new picture in the picture for needing to load of interception is known by calculating, Record corresponding Rect coordinate values.
Furthermore it is also possible to directly being set using clipRect methods on the picture for needing to load needs to show picture The Crop Area of content, can so realize the interception of above-mentioned picture region, while the new picture for recording interception needs to add described The Rect coordinates of the picture of load.
For example, clipRect (left, top, right, bottom) etc..
Preferably, the wide and high chi of the picture is obtained in the case where not giving the picture storage allocation for needing to load It is very little.
Memory source is wasted in order to avoid Memory Allocation is excessive, inventor is proposed not to the picture for needing to load The wide and high size of the picture is obtained under conditions of storage allocation.Concrete methods of realizing may refer to an example given below Son:
BitmapFactory.Options options=new BitmapFactory.Options ();
Options.inJustDecodeBounds=true;// not distribution diagram piece internal memory, only extract bitmap pictures Wide and high size;
BitmapFactory.decodeResource (getResources (), " picture resource ", options);
Int imageHeight=options.outHeight;The height of // picture
Int imageWidth=options.outWidth;The width of // picture
Preferably, the picture for needing to load is set previously according to the memory size of used mobile terminal device Corresponding definition.
Existing market intelligent mobile terminal equipment on sale is different due to the relevance between manufacturing cost and selling price The memory size of the intelligent mobile terminal equipment of price is also had any different, such as the internal memory of the intelligent mobile terminal equipment of low side can be with It is 1G or 2G;The internal memory of the intelligent mobile terminal equipment of main flow is 3G, the internal memory of high-end intelligent mobile terminal equipment be 4G or It is bigger.For the memory size of different mobile terminal devices, the picture of different definition can be set.The higher figure of definition Piece, its data volume are bigger.And the picture of the intelligent mobile terminal equipment loading fine definition in small internal memory, the i.e. big figure of data volume Piece, such as 2M or more pictures, it is clear that be very easy to that RAM leakage occurs, or cause the operation of intelligent mobile terminal very slow Slowly.So, can before step S1 is performed, previously according to used mobile terminal device memory size to set State the corresponding definition for the picture for needing to load.When the memory size of used intelligent mobile terminal equipment exceedes default threshold Value, the definition for setting the picture for needing to load are height;Conversely, the definition for setting the picture for needing to load is It is low.Here, predetermined threshold value can be 2G, i.e., when the internal memory of used intelligent mobile terminal equipment is more than 2G, set the need The form for the picture to be loaded is RGB_8888;When the internal memory of used intelligent mobile terminal equipment is less than or equal to 2G, set The form of the picture for needing to load is RGB_565.As it is known by the man skilled in the art that the picture of RGB_8888 forms:Often Individual pixel takes 4byte internal memories, the picture of RGB_565 forms:Each pixel takes 2byte internal memories, using used in The memory size of intelligent mobile terminal equipment sets the method for the corresponding definition of picture for needing to load, and can reduce Generation RAM leakage or the slow-paced risk of terminal operating.
S2:Monitoring shows the touch event of the view of the new picture, when user slides display on the view New picture when obtain the change in location of new picture movement in real time and be converted into needing to load described by change in location information Picture Rect coordinates, the picture that needs intercept is calculated in the wide and high size range of picture for needing to load accordingly Region.
Because the picture that view display area domain is shown is a part of content of original image, if user wants to see original image Other contents not shown when, often touch the picture that the view display area domain is shown and make it is upward, downward, To the left or right direction is mobile or the gesture slided, it is intended to watches the content not shown by mobile picture.In order to full This demand of sufficient user, also for allowing user to obtain more preferable Product Experience, monitoring is now needed to show the new picture Whether the view occurs touch event, when monitor user touch the picture that the view display area domain shows and make to It is upper, downwards, to the left or right direction is mobile or the gesture slided, that is, monitor to show that the view of the new picture occurs Touch event, and when user is mobile or slides the picture shown on the view, direction that is mobile or sliding can be Upwards, downwards, to the left or to the right, the change in location that the new picture moves is obtained according to existing screen sliding technology in real time, and By in the Rect coordinate systems of change in location information MAP to the picture for needing to load, that is, it is converted into the figure for needing to load The Rect coordinates of piece, the wide and high size for the picture that can be thus loaded according to corresponding Rect coordinate informations in the needs In the range of calculate and need the picture region that intercepts.The wide and high size range for the picture that needs described here load is exactly in step The wide and high size of the picture obtained in rapid S1 is, it is necessary to which the picture region of interception obviously can not exceed the picture for needing to load Wide and high size range.
During specifically step S2 is performed, such as View (view) object reference can be used SetOnTouchListener (mOnTouchListener) method is realized to set monitor and monitors the display new picture The view touch event.OnTouch () method in calling the monitor in Touch (touch) event of generation To handle Touch (touch) event, ACTION_DOWN events, ACTION_MOVE events, ACTION_UP events are such as handled Deng.Can also using rewrite onTouchEvent methods come handle for example ACTION_DOWN events, ACTION_MOVE events, ACTION_UP events etc..Using these described methods can when user is sliding the new picture of display on the view it is real-time The change in location of new picture movement is obtained, then method known to use is by the X and Y of the pixel coordinate for screen of acquisition Value is mapped in the Rect coordinate systems of the picture for needing to load, and newly picture will be changed with the mobile gesture of user and be moved The X of pixel coordinate that is obtained of change in location and Y value be converted to the corresponding Rect coordinate values of the picture for needing to load, root The picture region for needing to intercept is calculated according to the corresponding Rect coordinate values being converted to, the picture region to be intercepted is necessary certainly In the wide and high size range of the picture for needing to load, i.e., it can not exceed the border of the picture for needing to load.
When calculating the picture region for needing to intercept, can be realized using various ways, such as can pass through BitmapRegionDecoder.decodeRegion methods are realized.
S3:According to the data of calculating the corresponding picture region of real-time interception is needed on the picture that loads described and in institute State the picture that real-time rendering in view is intercepted.
After the data for the picture region for needing to intercept are obtained, it is possible to cut in real time on the picture for needing to load Corresponding picture region is taken, the image content of the interception is plotted to described regard for example, by Canvas.drawBitmap methods It is shown in figure (View).
Make when the picture that user's touch view display area domain is shown and repeatedly upward, downward, leftward or rightward side To movement or during slip gesture, it is possible to see complete original image content.
In a preferred embodiment, before step S1 is performed, the picture size for needing to load is prejudged, when described Handled when the picture size for needing to load exceeds predetermined threshold value by compressing first to reduce the size of the picture.As described above , when the picture size for needing to load exceeds 3M or 4M, even if now only loading the part figure of original image Piece content, the excessive caused problem of processing image data also easily occurs, it is therefore preferred that to the super large beyond predetermined threshold value Picture is handled beforehand through compression first to reduce the size of the picture.For example, it is assumed that predetermined threshold value is 3M, then to more than 3M's Picture is compressed so that the data volume of the picture is reduced within such as 1M.
According to the picture loading method of the present invention, adopted by the memory size according to the intelligent mobile terminal equipment used Different display strategies are taken, the partial picture content of loaded and displayed original image, are watched by the slip gesture of user complete Original image content, though the larger picture of data volume is thus loaded, such as the big picture more than more than 1M, or even more than 4M When, occupancy and the consumption of internal memory can be also reduced, and improve the big picture of loading to cause the excessive caused problem of EMS memory occupation, Such as RAM leakage or terminal operating speed are slow.
Fig. 2 is the schematic block diagram for the picture loading device that second embodiment of the invention provides.It is as shown in Fig. 2 of the invention Picture loading device include:
Dimension of picture acquiring unit, for obtaining the wide and high size for the picture for needing to load;
First picture region intercepts and drawing unit, for being used to show when the wide and high size for the picture for needing to load exceedes When showing the wide and high size in the view display area domain of the picture, wide and high size and institute are intercepted from the picture for needing to load State the wide and high equal sized new picture in view display area domain and the new picture is drawn in the view, wherein the new figure The center of piece is identical with the center of the picture for needing to load and records the new picture of interception in the figure for needing to load The Rect coordinates of piece;
Touch event monitors and processing unit, for monitoring the touch event for the view for showing the new picture, when User obtains the change in location of new picture movement when sliding the new picture of display on the view and by change in location in real time Information is converted into the Rect coordinates in the picture for needing to load, accordingly in the wide and high size of the picture for needing to load In the range of calculate and need the picture region that intercepts;
Second picture region intercepts and drawing unit, for the data according to calculating it is described need it is real on the picture that loads When intercept corresponding picture region and real-time rendering is intercepted in the view picture.
Wherein, the dimension of picture acquiring unit is used in the case of not to the picture storage allocation for needing to load Obtain the wide and high size of the picture.
Wherein, described device also includes:Picture pretreatment unit, it is used for:
The picture size for needing to load is prejudged, is passed through when the picture size for needing to load exceeds predetermined threshold value Compression is handled first to reduce the size of the picture;
The corresponding of the picture for needing to load is set previously according to the memory size of used mobile terminal device Definition.
Wherein, the touch event monitoring and processing unit pass through BitmapRegionDecoder.decodeRegion side Method needs the picture region that intercepts to calculate.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description Specific work process, may be referred to the corresponding process in preceding method embodiment, row illustrated example in preceding method embodiment And associated description, the course of work of interpreting means is equally applicable to, is not repeated to describe herein.
According to the picture loading device of the present invention, adopted by the memory size according to the intelligent mobile terminal equipment used Different display strategies are taken, the partial picture content of loaded and displayed original image, are watched by the slip gesture of user complete Original image content, though the larger picture of data volume is thus loaded, such as the big picture more than more than 1M, or even more than 4M When, occupancy and the consumption of internal memory can be also reduced, and improve the big picture of loading to cause the excessive caused problem of EMS memory occupation, Such as RAM leakage or terminal operating speed are slow.
The computer program product for the picture loading method that the embodiment of the present invention is provided, including store program code Computer-readable recording medium, the instruction that described program code includes can be used for performing the side described in previous methods embodiment Method, specific implementation can be found in embodiment of the method, will not be repeated here.
Therefore, present invention also offers a kind of storage device, wherein being stored with a plurality of instruction, the instruction is suitable to by handling Device loads and performs method as in the first embodiment or the first embodiment combines described method with preferred embodiment.
If the function is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can be with It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words The part to be contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter Calculation machine software product is stored in a storage medium, including some instructions are causing a computer equipment (can be People's computer, Intelligent flat computer, smart mobile phone, server, or network equipment etc.) perform described in each embodiment of the present invention The all or part of step of method.And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (ROM), deposit at random Access to memory (RAM), magnetic disc or CD etc. are various can be with the medium of store program codes.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.

Claims (10)

1. a kind of picture loading method, it includes:
When the wide and high size for the picture for needing to load exceedes the wide and high size in the view display area domain for being used to show the picture When, from equal sized new of the wide and height for needing to intercept wide and high size and the view display area domain in the picture that loads Picture and the new picture is drawn in the view, wherein the center of the new picture and the center of the picture for needing to load Rect coordinate of the new picture that is identical and recording interception in the picture for needing to load;
Monitoring shows the touch event of the view of the new picture, when user slides the new picture of display on the view When obtain the change in location of new picture movement in real time and change in location information be converted into the picture for needing to load Rect coordinates, the picture region for needing to intercept is calculated in the wide and high size range of the picture for needing to load accordingly;
According to the data of calculating the corresponding picture region of real-time interception is needed on the picture that loads described and in the view The picture that middle real-time rendering is intercepted.
2. according to the method for claim 1, it is characterised in that the picture size for needing to load is prejudged, when the needs Handled when the picture size of loading exceeds predetermined threshold value by compressing first to reduce the size of the picture.
3. according to the method for claim 1, it is characterised in that do not giving the feelings of the picture storage allocation for needing to load The wide and high size of the picture is obtained under condition.
4. according to the method for claim 1, it is characterised in that big previously according to the internal memory of used mobile terminal device It is small that the corresponding definition of picture for needing to load is set.
5. according to the method for claim 1, it is characterised in that pass through when calculating the picture region for needing to intercept BitmapRegionDecoder.decodeRegion methods are realized.
6. a kind of picture loading device, it includes:
Dimension of picture acquiring unit, for obtaining the wide and high size for the picture for needing to load;
First picture region intercepts and drawing unit, for being used to show this when the wide and high size for the picture for needing to load exceedes Wide and high size is intercepted during the wide and high size in the view display area domain of picture, in the picture loaded from the needs to regard with described The width of figure viewing area and high equal sized new picture and the new picture is drawn in the view, wherein the new picture Center is identical with the center of the picture for needing to load and records the new picture of interception in the picture for needing to load Rect coordinates;
Touch event monitors and processing unit, for monitoring the touch event for the view for showing the new picture, works as user Obtain the change in location of new picture movement in real time when sliding the new picture of display on the view and by change in location information The Rect coordinates in the picture for needing to load are converted into, accordingly in the wide and high size range of the picture for needing to load It is interior to calculate the picture region for needing to intercept;
Second picture region intercepts and drawing unit, is cut in real time on the picture for needing to load for the data according to calculating Take corresponding picture region and real-time rendering is intercepted in the view picture.
7. device according to claim 5, it is characterised in that the dimension of picture acquiring unit is used to not give the need The wide and high size of the picture is obtained in the case of the picture storage allocation to be loaded.
8. device according to claim 5, it is characterised in that also include:Picture pretreatment unit, it is used for:
The picture size for needing to load is prejudged, passes through compression when the picture size for needing to load exceeds predetermined threshold value Handle first to reduce the size of the picture;
The corresponding clear of the picture for needing to load is set previously according to the memory size of used mobile terminal device Degree.
9. device according to claim 5, it is characterised in that the touch event monitoring and processing unit pass through BitmapRegionDecoder.decodeRegion methods need the picture region that intercepts to calculate.
10. a kind of storage device, wherein being stored with a plurality of instruction, the instruction is suitable to be loaded by processor and performed right such as and wanted Seek the method described in one of 1-5.
CN201710831024.5A 2017-09-15 2017-09-15 A kind of picture loading method and device Pending CN107608731A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710831024.5A CN107608731A (en) 2017-09-15 2017-09-15 A kind of picture loading method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710831024.5A CN107608731A (en) 2017-09-15 2017-09-15 A kind of picture loading method and device

Publications (1)

Publication Number Publication Date
CN107608731A true CN107608731A (en) 2018-01-19

Family

ID=61062998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710831024.5A Pending CN107608731A (en) 2017-09-15 2017-09-15 A kind of picture loading method and device

Country Status (1)

Country Link
CN (1) CN107608731A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445895A (en) * 2018-10-26 2019-03-08 深圳易嘉恩科技有限公司 The method and device of the non-distorted load large scale picture of Android platform
CN109739403A (en) * 2018-12-28 2019-05-10 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN109800783A (en) * 2018-12-11 2019-05-24 中新金桥数字科技(北京)有限公司 The method and its system of super large picture superposition comparison are realized based on Android Pad
CN110333812A (en) * 2019-05-22 2019-10-15 浙江口碑网络技术有限公司 Interactive display method, device and storage medium, the electronic device of slide
CN110399069A (en) * 2018-04-25 2019-11-01 北京京东尚科信息技术有限公司 Image display method and device
CN111290676A (en) * 2020-03-02 2020-06-16 北京金山安全软件有限公司 Method, device and equipment for intercepting picture of designated area in client
CN111694493A (en) * 2020-06-08 2020-09-22 杭州有赞科技有限公司 Webpage screenshot method, computer equipment and readable storage medium
CN116257707A (en) * 2023-01-04 2023-06-13 腾讯科技(深圳)有限公司 Application release method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160086585A1 (en) * 2014-09-24 2016-03-24 Square Enix Co., Ltd. Image display program, image display method, and image display system
CN106502613A (en) * 2016-10-25 2017-03-15 武汉斗鱼网络科技有限公司 A kind of method and device for Loading Image
CN106569894A (en) * 2016-10-11 2017-04-19 北京元心科技有限公司 Picture loading method and system
CN106598523A (en) * 2016-12-16 2017-04-26 北京猎豹移动科技有限公司 Picture loading method, device and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160086585A1 (en) * 2014-09-24 2016-03-24 Square Enix Co., Ltd. Image display program, image display method, and image display system
CN106569894A (en) * 2016-10-11 2017-04-19 北京元心科技有限公司 Picture loading method and system
CN106502613A (en) * 2016-10-25 2017-03-15 武汉斗鱼网络科技有限公司 A kind of method and device for Loading Image
CN106598523A (en) * 2016-12-16 2017-04-26 北京猎豹移动科技有限公司 Picture loading method, device and electronic equipment

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110399069A (en) * 2018-04-25 2019-11-01 北京京东尚科信息技术有限公司 Image display method and device
CN109445895A (en) * 2018-10-26 2019-03-08 深圳易嘉恩科技有限公司 The method and device of the non-distorted load large scale picture of Android platform
CN109800783A (en) * 2018-12-11 2019-05-24 中新金桥数字科技(北京)有限公司 The method and its system of super large picture superposition comparison are realized based on Android Pad
CN109739403A (en) * 2018-12-28 2019-05-10 北京字节跳动网络技术有限公司 Method and apparatus for handling information
CN109739403B (en) * 2018-12-28 2020-08-07 北京字节跳动网络技术有限公司 Method and apparatus for processing information
CN110333812A (en) * 2019-05-22 2019-10-15 浙江口碑网络技术有限公司 Interactive display method, device and storage medium, the electronic device of slide
CN110333812B (en) * 2019-05-22 2021-09-21 浙江口碑网络技术有限公司 Interactive display method and device for sliding operation, storage medium and electronic device
CN111290676A (en) * 2020-03-02 2020-06-16 北京金山安全软件有限公司 Method, device and equipment for intercepting picture of designated area in client
CN111290676B (en) * 2020-03-02 2021-02-12 北京金山安全软件有限公司 Method, device and equipment for intercepting picture of designated area in client
CN111694493A (en) * 2020-06-08 2020-09-22 杭州有赞科技有限公司 Webpage screenshot method, computer equipment and readable storage medium
CN111694493B (en) * 2020-06-08 2022-05-31 杭州有赞科技有限公司 Webpage screenshot method, computer equipment and readable storage medium
CN116257707A (en) * 2023-01-04 2023-06-13 腾讯科技(深圳)有限公司 Application release method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN107608731A (en) A kind of picture loading method and device
US8402379B2 (en) Dynamic content layout for a user interface display
US20180101295A1 (en) System for displaying elements of a scrollable list
US8751542B2 (en) Dynamically scalable modes
US20170139824A1 (en) Memory management and image display for mobile devices
EP2464093A1 (en) Image file generation device, image processing device, image file generation method, and image processing method
CN109388317B (en) Picture loading method, terminal device and storage medium
JP6673905B2 (en) System, method, and computer program product for automatically optimizing 3D texture models for network transfer and real-time rendering
CN107807764A (en) A kind of page display method and client
CN113420009B (en) Electromagnetic data analysis device, system and method based on big data
KR20170065085A (en) Method and apparuts for system resource managemnet
CN104637068A (en) Detection method and detection device for shielding of video frames and video pictures
CN107679150B (en) Mass three-dimensional data rapid scheduling method
CN111444158A (en) Long-short term user portrait generation method, device, equipment and readable storage medium
CN112559838A (en) Unmanned cabin operation condition analysis method and device
CN108989872B (en) Android television background fast switching method, framework, server and storage medium
CN114820988A (en) Three-dimensional modeling method, device, equipment and storage medium
CN113763552A (en) Three-dimensional geographic model display method and device, computer equipment and storage medium
EP3872655A1 (en) Webpage illustration processing method, system and device, and storage medium
CN114217758A (en) Image display method, image display device, electronic equipment and computer readable storage medium
US10803566B2 (en) Method for dynamically adjusting image clarity and image processing device using the same
CN115239895B (en) Mass data loading and optimal rendering method for GIS water environment 3D map
CN105488054A (en) Method and device for browsing image
CN110399581A (en) Page rendering method, equipment, storage medium and device based on machine learning
CN115147856B (en) Table information extraction method and electronic equipment

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200907

Address after: 310052 room 508, floor 5, building 4, No. 699, Wangshang Road, Changhe street, Binjiang District, Hangzhou City, Zhejiang Province

Applicant after: Alibaba (China) Co.,Ltd.

Address before: 510627 Guangdong city of Guangzhou province Whampoa Tianhe District Road No. 163 Xiping Yun Lu Yun Ping square B radio tower 15 layer self unit 02

Applicant before: GUANGZHOU UC NETWORK TECHNOLOGY Co.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180119