CN110134319A - A kind of image display method and apparatus based on Android system - Google Patents
A kind of image display method and apparatus based on Android system Download PDFInfo
- Publication number
- CN110134319A CN110134319A CN201910409519.8A CN201910409519A CN110134319A CN 110134319 A CN110134319 A CN 110134319A CN 201910409519 A CN201910409519 A CN 201910409519A CN 110134319 A CN110134319 A CN 110134319A
- Authority
- CN
- China
- Prior art keywords
- display screen
- image
- display
- gesture operation
- displayed
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
- G06F3/04883—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures for inputting data by handwriting, e.g. gesture or text
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2203/00—Indexing scheme relating to G06F3/00 - G06F3/048
- G06F2203/048—Indexing scheme relating to G06F3/048
- G06F2203/04806—Zoom, i.e. interaction techniques or interactors for controlling the zooming operation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Controls And Circuits For Display Device (AREA)
Abstract
The present invention discloses a kind of image display method and apparatus based on Android system, comprising: image to be displayed is loaded onto display screen with pre-defined rule;The display screen is touch screen;The gesture operation on the display screen is detected, gesture operation result is obtained;According to the resolution ratio of the gesture operation result and the display screen, the local image region of required display in the image to be displayed is obtained;The local image region is displayed in full screen on the display screen.Technical solution provided by the invention can occupy lesser memory when displaying an image, to improve picture display rate, improve user experience.
Description
Technical field
The present invention relates to image display technology field more particularly to a kind of image display methods based on Android system
And device.
Background technique
With the raising of camera pixel, the pixel of captured image is also increasing, causes in various mobile terminals
The memory occupied needed for upper display image is also increasing.And for most of mobile terminal, memory source is all very
Valuable.When showing this high-definition image, the excessive memory of occupancy system not only results in that picture display rate is slow, image quilt
Reaction speed is slow when sliding, and has the risk of software crash.For example, being shown using the ImageView under Android system
Show the image of 48,000,000 pixels, it will occupy the memory of about 183M, and an app size in total only several hundred million.If
It will be shown after compression of images, and many image details can be lost.As it can be seen that existing display mode when showing high-definition image
It is not able to satisfy user demand.
Summary of the invention
The present invention is intended to provide a kind of image display method and apparatus based on Android system, it can be in display image
The lesser memory of Shi Zhanyong, to improve picture display rate, improve user experience.
In order to achieve the above objectives, The technical solution adopted by the invention is as follows:
A kind of image display method based on Android system, comprising: be loaded into pre-defined rule image to be displayed aobvious
Display screen;The display screen is touch screen;The gesture operation on the display screen is detected, gesture operation result is obtained;According to described
The resolution ratio of gesture operation result and the display screen obtains the local image region of required display in the image to be displayed;
The local image region is displayed in full screen on the display screen.
Preferably, it is described by the local image region on the display screen carry out full screen display include: by the office
Portion's image-region is split, and obtains at least one piece of cut zone;Every piece of cut zone is converted into needed for OpenGL ES
Data texturing;The data texturing is rendered on GLSurfaceView.
Further, when detecting the gesture operation on the display screen is slide, the gesture operation result
Glide direction and the slide sliding on the display screen for including: the slide relative to the display screen
Distance.
Further, when detecting the gesture operation on the display screen to be enlarged, the gesture operation result
It include: the amplification factor of the amplification central point and the amplifying operation of the amplifying operation.
Further, when detecting the gesture operation on the display screen is reduction operation, the gesture operation result
It include: the minification of the diminution central point and the reduction operation of the reduction operation.
A kind of image display device based on Android system, comprising: loading unit is used for image to be displayed with pre-
Set pattern is then loaded onto display screen;The display screen is touch screen;Detection unit, for detecting the behaviour of the gesture on the display screen
Make, obtains gesture operation result;Display area acquisition unit, for point according to the gesture operation result and the display screen
Resolution obtains the local image region of required display in the image to be displayed;Display unit is used for the area, topography
Domain is displayed in full screen on the display screen.
Preferably, the display unit includes: cutting unit, for the local image region to be split, is obtained
At least one piece of cut zone;Converting unit, for texture number needed for every piece of cut zone is converted into OpenGL ES
According to;OpenGL ES, for the data texturing to be rendered to the GLSurfaceView in OpenGL ES.
Image display method and apparatus provided in an embodiment of the present invention based on Android system, by detecting display screen
On gesture operation, and determine according to gesture operation result and the resolution ratio of display screen required display in image to be displayed
Local image region, i.e. actual displayed region, so that not needing during being shown to image to be displayed as the prior art
It requires to load all image datas every time like that, but carries out the load of partial image data according to actual displayed region,
I.e. each loaded and displayed is part image that user wishes to, it is seen then that compared with prior art, technology of the invention
Occupied memory will greatly reduce scheme when displaying an image.In addition, the present invention is carrying out full frame show to local image region
When showing, using the side that local image region is carried out block segmentation, data texturing is converted into and renders to GLSurfaceView
Formula carries out, and this rendering mode is compared with existing display mode, and speed is fast, picture refreshing frame per second is high, so as to further
It improves picture display rate, improve user experience.
Detailed description of the invention
Fig. 1 is the method flow diagram of the embodiment of the present invention one;
Fig. 2 is the method flow diagram of the embodiment of the present invention two;
Fig. 3 is the structure drawing of device of the embodiment of the present invention one;
Fig. 4 is the structure drawing of device of the embodiment of the present invention two.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, below in conjunction with attached drawing, to the present invention into
Row is further described.
Fig. 1 is the method flow diagram of the embodiment of the present invention one, comprising:
Step 101, image to be displayed is loaded onto display screen with pre-defined rule;The display screen is touch screen;
In this step, the pre-defined rule is the initial display mode defaulted.When the image to be displayed is a Zhang Chao
When the big figure of high definition, a portion is shown using default display mode, alternatively, showing that image is whole using default resolution.Together
When, BitmapRegionDecoder tool-class has been initialized according to the file path of image to be displayed.
BitmapRegionDecoder is the tool that local sampling can be carried out to image that android system provides.
Step 102, the gesture operation on the display screen is detected, gesture operation result is obtained;
Step 103, it according to the resolution ratio of the gesture operation result and the display screen, obtains in the image to be displayed
The local image region of required display;
In the present embodiment, detect active user's using GestureDetector and ScaleGestureDetector
Operating gesture.GestureDetector is the gestures detection tool that android system provides, and be can detecte out currently to display
The operation of screen singly refers to operation or two fingers operation or slide etc..ScaleGestureDetector is equally Android
The gestures detection tool that system provides, can detecte out currently is amplifying operation or reduction operation to the operation of display screen.
In the present embodiment, the topography of required display in image to be displayed is obtained by BitmapRegionDecoder
The method in region is as follows:
Firstly, creating the tool object of a BitmapRegionDecoder by the data that Load Image.Secondly, utilizing
Above-mentioned GestureDetector and ScaleGestureDetector detects the operating gesture of active user, is slide,
Or amplifying operation or reduction operation.Above-mentioned detection instrument can be recorded just when user's finger is pressed on a display screen
Coordinate at beginning finger pressing, is denoted as (mLastX, mLastY) in a program.
When detecting the gesture operation on the display screen is slide, the gesture operation result includes: described
Glide direction and slide sliding distance on the display screen of the slide relative to the display screen.This
When, according to the glide direction, the resolution ratio of the sliding distance, the display screen, needed for obtaining in the image to be displayed
The local image region of display.
When detecting the gesture operation on the display screen to be enlarged, the gesture operation result includes: described
The amplification factor of the amplification central point and the amplifying operation of amplifying operation.At this point, according to the amplification central point, the amplification
The resolution ratio of multiple, the display screen obtains the local image region of required display in the image to be displayed.
When detecting the gesture operation on the display screen is reduction operation, the gesture operation result includes: described
The minification of the diminution central point and the reduction operation of reduction operation.At this point, according to the diminution central point, the diminution
The resolution ratio of multiple, the display screen, obtains the local image region of required display in the image to be displayed, and by this office
Portion's image-region uses four coordinate representations.Finally, being taken by the decodeRegion function in BitmapRegionDecoder
The local image region data out, for subsequent full screen display.
Step 104, the local image region is displayed in full screen on the display screen.
In the present embodiment, it is described by the local image region on the display screen carry out full screen display include:
Step 1041, the local image region is split, obtains at least one piece of cut zone;
In practical operation, the local image region can be reasonably divided into the cut section of N*N block according to actual needs
Domain.
Step 1042, data texturing needed for every piece of cut zone being converted into OpenGL ES;
In this step, after reading out the cut zone by image decoder first, then by every piece of cut zone
Data texturing needed for being converted into OpenGL ES submits to GPU (Graphics Processing Unit, graphics processor)
It is handled.OpenGL ES (OpenGL for Embedded Systems, the OpenGL of embedded system) is mobile platform
Open graphic library, be for render 2D, 3D vector graphics across language, cross-platform application programming interface, support
Android system.
Step 1043, the data texturing is rendered on GLSurfaceView.
In this step, GLSurfaceView is the image canvas that Android platform user shows OpenGL data.
It is this to divide the image into smaller piece, again in such a way that 3D Rendering renders each piece, there is faster wash with watercolours
The characteristics of contaminating speed and refresh rate, so as to further promote picture display rate.
For example, it is assumed that the resolution ratio of display screen is 1920*1080, when showing one using technical solution of the present invention
When the image of 48000000 pixels, occupied memory size is 1920*1080*4/1024/1024=8M or so, with the prior art
The memory that about 183M need to be occupied is compared, and EMS memory occupation amount substantially reduces.
Invention additionally discloses a kind of image display devices based on Android system, as shown in Figure 3, comprising: load is single
Member, for image to be displayed to be loaded onto display screen with pre-defined rule;The display screen is touch screen;Detection unit, for examining
The gesture operation on the display screen is surveyed, gesture operation result is obtained;Display area acquisition unit, for being grasped according to the gesture
The resolution ratio for making result and the display screen obtains the local image region of required display in the image to be displayed;Display is single
Member, for the local image region to be displayed in full screen on the display screen.
Further, as shown in figure 4, the display unit includes: cutting unit, for by the local image region into
Row segmentation, obtains at least one piece of cut zone;Converting unit, for every piece of cut zone to be converted into OpenGL ES institute
The data texturing needed;OpenGL ES, for the data texturing to be rendered to the GLSurfaceView in OpenGL ES.
Image display device provided by the invention based on Android system, concrete operating principle and workflow are
Through being elaborated in image display method provided by the present invention, details are not described herein again.
Image display method and apparatus provided in an embodiment of the present invention based on Android system, by detecting display screen
On gesture operation, and determine according to gesture operation result and the resolution ratio of display screen required display in image to be displayed
Local image region, i.e. actual displayed region, so that not needing during being shown to image to be displayed as the prior art
It requires to load all image datas every time like that, but carries out the load of partial image data according to actual displayed region,
I.e. each loaded and displayed is part image that user wishes to, it is seen then that compared with prior art, technology of the invention
Occupied memory will greatly reduce scheme when displaying an image.In addition, the present invention is carrying out full frame show to local image region
When showing, using the side that local image region is carried out block segmentation, data texturing is converted into and renders to GLSurfaceView
Formula carries out, and this rendering mode is compared with existing display mode, and speed is fast, picture refreshing frame per second is high, so as to further
It improves picture display rate, improve user experience.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.
Claims (7)
1. a kind of image display method based on Android system characterized by comprising
Image to be displayed is loaded onto display screen with pre-defined rule;The display screen is touch screen;
The gesture operation on the display screen is detected, gesture operation result is obtained;
According to the resolution ratio of the gesture operation result and the display screen, the office of required display in the image to be displayed is obtained
Portion's image-region;
The local image region is displayed in full screen on the display screen.
2. the image display method according to claim 1 based on Android system, which is characterized in that it is described will be described
Local image region carries out full screen display on the display screen
The local image region is split, at least one piece of cut zone is obtained;
Data texturing needed for every piece of cut zone is converted into OpenGL ES;
The data texturing is rendered on GLSurfaceView.
3. the image display method according to claim 1 based on Android system, which is characterized in that when detecting
When to state gesture operation on display screen be slide, the gesture operation result includes:
Glide direction and slide sliding on the display screen of the slide relative to the display screen
Distance.
4. the image display method according to claim 1 based on Android system, which is characterized in that when detecting
When stating the gesture operation on display screen to be enlarged, the gesture operation result includes:
The amplification factor of the amplification central point and the amplifying operation of the amplifying operation.
5. the image display method according to claim 1 based on Android system, which is characterized in that when detecting
When to state gesture operation on display screen be reduction operation, the gesture operation result includes:
The minification of the diminution central point and the reduction operation of the reduction operation.
6. a kind of image display device based on Android system characterized by comprising
Loading unit, for image to be displayed to be loaded onto display screen with pre-defined rule;The display screen is touch screen;
Detection unit obtains gesture operation result for detecting the gesture operation on the display screen;
Display area acquisition unit, for the resolution ratio according to the gesture operation result and the display screen, obtain it is described to
Show the local image region of required display in image;
Display unit, for the local image region to be displayed in full screen on the display screen.
7. the image display device according to claim 6 based on Android system, which is characterized in that the display is single
Member includes:
Cutting unit obtains at least one piece of cut zone for the local image region to be split;
Converting unit, for data texturing needed for every piece of cut zone is converted into OpenGL ES;
OpenGL ES, for the data texturing to be rendered to the GLSurfaceView in OpenGL ES.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910409519.8A CN110134319A (en) | 2019-05-16 | 2019-05-16 | A kind of image display method and apparatus based on Android system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910409519.8A CN110134319A (en) | 2019-05-16 | 2019-05-16 | A kind of image display method and apparatus based on Android system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110134319A true CN110134319A (en) | 2019-08-16 |
Family
ID=67574657
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910409519.8A Pending CN110134319A (en) | 2019-05-16 | 2019-05-16 | A kind of image display method and apparatus based on Android system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110134319A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111736697A (en) * | 2020-06-22 | 2020-10-02 | 四川长虹电器股份有限公司 | Camera-based gesture control method |
CN113722030A (en) * | 2021-06-10 | 2021-11-30 | 荣耀终端有限公司 | Display method, electronic equipment and computer storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106873844A (en) * | 2015-12-11 | 2017-06-20 | 阿里巴巴集团控股有限公司 | Picture inspection method and device |
WO2017118982A1 (en) * | 2016-01-10 | 2017-07-13 | Project Ray Ltd. | Remotely controlled communicated image resolution |
CN107153500A (en) * | 2017-04-21 | 2017-09-12 | 努比亚技术有限公司 | It is a kind of to realize the method and apparatus that image is shown |
CN107463306A (en) * | 2017-07-12 | 2017-12-12 | 北京潘达互娱科技有限公司 | Method for displaying image and device |
CN109064543A (en) * | 2018-08-30 | 2018-12-21 | 十维度(厦门)网络科技有限公司 | A kind of graphical textures load rendering method |
-
2019
- 2019-05-16 CN CN201910409519.8A patent/CN110134319A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106873844A (en) * | 2015-12-11 | 2017-06-20 | 阿里巴巴集团控股有限公司 | Picture inspection method and device |
WO2017118982A1 (en) * | 2016-01-10 | 2017-07-13 | Project Ray Ltd. | Remotely controlled communicated image resolution |
CN107153500A (en) * | 2017-04-21 | 2017-09-12 | 努比亚技术有限公司 | It is a kind of to realize the method and apparatus that image is shown |
CN107463306A (en) * | 2017-07-12 | 2017-12-12 | 北京潘达互娱科技有限公司 | Method for displaying image and device |
CN109064543A (en) * | 2018-08-30 | 2018-12-21 | 十维度(厦门)网络科技有限公司 | A kind of graphical textures load rendering method |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111736697A (en) * | 2020-06-22 | 2020-10-02 | 四川长虹电器股份有限公司 | Camera-based gesture control method |
CN113722030A (en) * | 2021-06-10 | 2021-11-30 | 荣耀终端有限公司 | Display method, electronic equipment and computer storage medium |
CN113722030B (en) * | 2021-06-10 | 2022-12-16 | 荣耀终端有限公司 | Display method, electronic equipment and computer storage medium |
US12020620B2 (en) | 2021-06-10 | 2024-06-25 | Honor Device Co., Ltd. | Display method, electronic device, and computer storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200320787A1 (en) | Foveated geometry tessellation | |
KR102475212B1 (en) | Foveated rendering in tiled architectures | |
US12026798B2 (en) | Variable resolution graphics processing | |
CN111798372B (en) | Image rendering method, device, equipment and readable medium | |
EP2945374B1 (en) | Positioning of projected augmented reality content | |
CN106055295B (en) | Image processing method, picture method for drafting and device | |
CN100583022C (en) | Method for capturing computer screen image | |
KR102499397B1 (en) | Method and apparatus for performing graphics pipelines | |
EP3804347B1 (en) | A method for processing image data with reduced transmission bandwidth for display | |
KR20160069801A (en) | Apparatus and Method for rendering | |
JP2018512644A (en) | System and method for reducing memory bandwidth using low quality tiles | |
US11398065B2 (en) | Graphic object modifications | |
US11832991B2 (en) | Automatic ultrasound feature detection | |
CN101398742A (en) | Medical image system pathfinder implementing method based on thumbnail | |
CN110134319A (en) | A kind of image display method and apparatus based on Android system | |
CN110599564A (en) | Image display method and device, computer equipment and storage medium | |
EP2485190A1 (en) | Adapting the resolution of a graphic representation of metadata | |
US20070186191A1 (en) | Method of visualizing a pointer during interaction | |
CN107301045B (en) | Window display method and device | |
CN109739403B (en) | Method and apparatus for processing information | |
JP5795916B2 (en) | Image processing apparatus and image processing method | |
US20210233292A1 (en) | Image generating apparatus, and image generating method and program | |
CN115187515A (en) | Image processing apparatus, method, device, and readable storage medium | |
CN112988609B (en) | Data processing method, device, storage medium and client | |
CN113703653A (en) | Image processing method, device, equipment and computer readable storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190816 |