CN108008991A - A kind of image processing method, terminal and computer-readable recording medium - Google Patents
A kind of image processing method, terminal and computer-readable recording medium Download PDFInfo
- Publication number
- CN108008991A CN108008991A CN201711042445.6A CN201711042445A CN108008991A CN 108008991 A CN108008991 A CN 108008991A CN 201711042445 A CN201711042445 A CN 201711042445A CN 108008991 A CN108008991 A CN 108008991A
- Authority
- CN
- China
- Prior art keywords
- display page
- information
- cutting
- clipping region
- transparent view
- 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/04886—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 by partitioning the display area of the touch-screen or the surface of the digitising tablet into independently controllable areas, e.g. virtual keyboards or menus
Abstract
An embodiment of the present invention provides a kind of image processing method, terminal and computer-readable recording medium, including:In the display page, clipping region information is determined;The cutting parameter of painting canvas is set according to definite clipping region information;The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.The embodiment of the present invention reduces bitmap and cuts step, reduces picture and cuts the probability overflowed to the occupancy and memory of terminal memory.
Description
Technical field
The present invention relates to terminal applies technology, espespecially a kind of image processing method, terminal and computer-readable recording medium.
Background technology
On the mobile terminals such as mobile phone, tablet computer, each application (APP) can be according to the requirement of own service to some pages
Face carries out sectional drawing and cuts;For example, the browser in android terminal is intercepted to starting the page, when browser starts, first
Show the startup page of interception, to achieve the purpose that to obtain preferable user experience;The user of instant chat application will chat
Record is shared with good friend by way of interception;In multimedia terminal during playing audio-video document, the current broadcasting page is cut
Deng.
At present, the sectional drawing processing that page interception generally requires bitmap (Bitmap) twice is carried out, including:Intercepted by painting canvas
Current display page, generates source bitmap;Determine that clipping region is believed by cutting interactive interface by user on the source bitmap of generation
After breath, the cutting parameter of painting canvas is set according to definite clipping region information, by completing the painting canvas of cutting parameter setting to life
Into source bitmap cut, obtain purpose bitmap.
The mode of above-mentioned acquisition purpose bitmap, at least needs to carry out by painting canvas:Intercept current display page generation source position
Figure, and cutting current display page obtain purpose bitmap and could complete;And intercept current display page and cut source bitmap and be both needed to
More terminal memory is consumed, when terminal limited memory, it is easy to the exception that memory overflows (OOM) occur.
The content of the invention
For above-mentioned technical problem, an embodiment of the present invention provides a kind of image processing method, terminal and computer-readable
Storage medium, can reduce picture and cut the probability overflowed to the occupancy and memory of terminal memory.
An embodiment of the present invention provides a kind of image processing method, including:
In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;
The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.
Optionally, the definite clipping region information includes:
Default transparent view is loaded on the display page;
By receiving cut size information input by user on the default transparent view and cutting coordinate information.
Optionally, it is described to show that loading default transparent view on the page includes described:
After receiving cutting instruction, the transparent view is loaded on into the display page.
Optionally, the definite clipping region information includes:
Default input frame is loaded on the display page, sanction input by user is received by the default input frame
Cut dimension information and cut coordinate information.
Optionally, it is described when directly receiving cut size information input by user and cutting coordinate information, at the picture
Reason method further includes:
On the display page, show the cut size information and cut coordinate information.
On the other hand, the embodiment of the present invention also provides a kind of terminal, and it is total that the terminal includes processor, memory and communication
Line;
The communication bus is used for realization the connection communication between processor and memory;
The processor is used to perform the picture processing program stored in memory, to realize following steps:
In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;
The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.
Optionally, the processor is used to include the step of performing definite clipping region information:
Default transparent view is loaded on the display page;
By receiving cut size information input by user on the default transparent view and cutting coordinate information.
Optionally, the processor is used to perform shows that the step of loading default transparent view on the page is wrapped described
Include:
After receiving cutting instruction, the transparent view is loaded on into the display page.
Optionally, the processor is used to include the step of performing definite clipping region information:
Default input frame is loaded on the display page, sanction input by user is received by the default input frame
Cut dimension information and cut coordinate information.
Another further aspect, the embodiment of the present invention also provide a kind of computer-readable recording medium, the computer-readable storage
Media storage has one or more program, and one or more of programs can be performed with reality by one or more processor
Existing above-mentioned image processing method.
Compared with correlation technique, technical solution of the embodiment of the present invention includes:.The embodiment of the present invention realizes.
Brief description of the drawings
Attached drawing described herein is used for providing a further understanding of the present invention, forms the part of the application, this hair
Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the hardware configuration signal for realizing each one optional mobile terminal of embodiment of the present invention;
Fig. 2 is the flow chart of image processing method of the embodiment of the present invention;
Fig. 3 is the interactive interface schematic diagram that the embodiment of the present invention determines clipping region;
Fig. 4 is the display figure of transparent view of the embodiment of the present invention;
Fig. 5 is the schematic diagram for the input frame that the embodiment of the present invention determines clipping region information;
Fig. 6 is the schematic diagram that the embodiment of the present invention carries out clipping region presentation of information;
Fig. 7 is another embodiment of the present invention image processing method flow chart;
Fig. 8 is yet another embodiment of the invention image processing method flow chart;
Fig. 9 is the structure diagram of terminal of the embodiment of the present invention.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In follow-up description, the suffix using such as " module ", " component " or " unit " for representing element is only
Be conducive to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention can include such as mobile phone, tablet
Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move
Dynamic terminal, and the fixed terminal such as numeral TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special
Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting
Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit
103rd, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit
108th, the component such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1
Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or fewer components,
Either combine some components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station
Downlink information receive after, handled to processor 110;In addition, by the data sending of uplink to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate
Frequency unit 101 can also be communicated by wireless communication with network and other equipment.Above-mentioned wireless communication can use any communication
Standard or agreement, include but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division
Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, frequency division duplex Long Term Evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browse webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need
To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100
Formula, speech recognition mode, broadcast reception mode when under isotype, by radio frequency unit 101 or WiFi module 102 it is receiving or
It is sound that the voice data stored in memory 109, which is converted into audio signal and exports,.Moreover, audio output unit 103
The relevant audio output of specific function performed with mobile terminal 100 can also be provided (for example, call signal receives sound, disappears
Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input units 104 are used to receive audio or video signal.A/V input units 104 can include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) carry out
Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited
Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can
To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model.
Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound
The noise produced during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies
Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein, ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear
Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general
For three axis) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;
The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer,
The other sensors such as hygrometer, thermometer, infrared ray sensor, details are not described herein.
Display unit 106 is used for the information for showing by information input by user or being supplied to user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used
Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal
The key signals input that family is set and function control is related.Specifically, user input unit 107 may include contact panel 1071 with
And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect user on it or neighbouring touch control operation
(for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071
Neighbouring operation), and corresponding attachment device is driven according to formula set in advance.Contact panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch control operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
Contact coordinate is converted into, then gives processor 110, and the order that processor 110 is sent can be received and performed.In addition, can
To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, operation lever etc.
One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, when contact panel 1071 detect on it or
After neighbouring touch control operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel
1061 be the component independent as two to realize the function that outputs and inputs of mobile terminal, but in certain embodiments, can
The function that outputs and inputs of mobile terminal is realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically
Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example,
External device (ED) can include wired or wireless head-band earphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number
It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with
For transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area
And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function
Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as
Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection
A part, by running or performing the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109, perform the various functions and processing data of mobile terminal, so as to carry out integral monitoring to mobile terminal.Place
Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Device is managed, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is main
Handle wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put
The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Fig. 2 is the flow chart of image processing method of the embodiment of the present invention, as shown in Fig. 2, including:
Step 201, showing the page, determines clipping region information;
It should be noted that the embodiment of the present invention is in the display page by directly determining clipping region information, relative to adopting
After display page interception acquisition source bitmap is first carried out with painting canvas, then source bitmap cut and obtains purpose bitmap, reduce picture
The process that cloth intercepts the display page, reduces the EMS memory occupation of terminal and produces the probability that memory overflows.
Step 202, the cutting parameter according to definite clipping region information setting painting canvas;
It should be noted that the technology that painting canvas is known to the skilled person, the embodiment of the present invention sets the sanction of painting canvas
Cutting the method for parameter can set the method for cutting parameter identical with correlation technique;I.e. with being determined in correlation technique on the bitmap of source
After the information of clipping region, as the setting for the cutting parameter for carrying out painting canvas according to definite clipping region information, do not do herein superfluous
State.
Step 203, the painting canvas set by completing cutting parameter cut the display page, to obtain purpose bitmap.
After the embodiment of the present invention completes painting canvas cutting parameter setting, directly can only it be passed through in the display page by painting canvas
Once cut just complete picture processing, reduce bitmap cut number, reduce terminal EMS memory occupation and memory overflow it is general
Rate.
Optionally, the embodiment of the present invention determines that clipping region information includes:
Default transparent view is loaded on the display page;
By receiving cut size information input by user on the default transparent view and cutting coordinate information.
It should be noted that clipping region of embodiment of the present invention information directly by cut size information and can cut coordinate
Information determines;
In addition, after loading transparent view, user can be determined cut size information by touch control operation and cut coordinate letter
Breath;After loading transparent view, user realizes determining for clipping region on transparent view by touch control operation;Transparent view connects
When receiving the clipping region that user's touch control operation determines, can by correlation technique obtain clipping region cut size information and
Cut coordinate information.Fig. 3 is the interactive interface schematic diagram that the embodiment of the present invention determines clipping region, as shown in Figure 3, it is assumed that is cut
Region is rectangle, then user can directly determine the diagonal of clipping region by 2 touch-controls;Alternatively, user can pass through two
Secondary click determines the diagonal of clipping region respectively.If clipping region is irregular figure, user can directly pass through slip
Operation determines irregular figure;Irregular figure that user can also select to be stored in advance on interactive interface (including it is but unlimited
In, pentalpha, pentagon, equilateral triangle etc.) after, determine the geometric center and size of irregular figure;
Optionally, the embodiment of the present invention loads default transparent view on the display page and includes:
After receiving cutting instruction, the transparent view is loaded on into the display page.
It should be noted that when transparent view is covered in the display page by the embodiment of the present invention, can be by identifiable
Block diagram is identified transparent view display.Fig. 4 is the display figure of transparent view of the embodiment of the present invention, as shown in figure 4, carrying out figure
During piece processing, transparent view is covered in the display page, and the block diagram that form is dotted line is shown in the fringe region of the display page;When
So, the embodiment of the present invention can also be identified transparent view display using other modes;For example, believe in definite clipping region
Before breath, transparent view is shown in a manner of the transparency less than 100%;Alternatively, grey or white is added on transparent view
The color that color etc. can have an impact to showing the display effect of the page;The embodiment of the present invention can also identify by other means
Transparent view, this will not be repeated here.
Optionally, the embodiment of the present invention determines that clipping region information includes:
Default input frame is loaded on the display page, sanction input by user is received by the default input frame
Cut dimension information and cut coordinate information.
Optionally, loading default input frame on the display page includes:
After receiving cutting instruction, default input frame is loaded on the display page.
Fig. 5 is the schematic diagram for the input frame that the embodiment of the present invention determines clipping region information, as shown in fig. 5, it is assumed that cutting
Region is rectangle, can be included in the input frame of display page loading:For inputting the input frame and use of rectangular centre point coordinates
In input rectangle length and the coordinate of width;Alternatively, the coordinate for inputting wherein one cornerwise two vertex of rectangle.
Optionally, when directly receiving cut size information input by user and cutting coordinate information, figure of the embodiment of the present invention
Piece processing method further includes:
On the display page, show the cut size information and cut coordinate information.
The embodiment of the present invention, if receiving cut size information input by user and cutting by the default input frame
Coordinate information, then cut size information and cutting coordinate information are relatively more abstract, therefore, by showing cut size in the display page
Information and cutting coordinate information, the definite clipping region that householder can be used to see, contribute to user to carry out accurate picture cutting.
Showing the cut size information and cutting coordinate information can be shown in a manner of coordinate points, can also be shown on transparent view
Show.Fig. 6 is the schematic diagram that the embodiment of the present invention carries out clipping region presentation of information, as shown in fig. 6, the input frame based on Fig. 5, is used
After family have input cut size information and cut coordinate information, according to cut size information and cutting coordinate letter on the display page
Breath shows clipping region, and user can intuitively determine clipping region, and be adjusted on this basis.
Compared with correlation technique, technical solution of the embodiment of the present invention includes:In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;By completing the painting canvas of cutting parameter setting to showing the page
Cut, to obtain purpose bitmap.The embodiment of the present invention reduces bitmap and cuts step, reduces picture and cuts in terminal
The probability that the occupancy and memory deposited are overflowed.
Fig. 7 is another embodiment of the present invention image processing method flow chart, as shown in fig. 7, comprises:
Step 701, showing page reception cutting instruction;
The cutting instruction that step 702, basis receive, the display page is loaded on by transparent view;
It should be noted that when transparent view is covered in the display page by the embodiment of the present invention, can be by identifiable
Block diagram is identified transparent view display.Transparent view of the embodiment of the present invention is covered in the display page, can be in the display page
Fringe region display format be dotted line block diagram;Certainly, the embodiment of the present invention can also use other modes to transparent view
It is identified display;For example, before the information of definite clipping region, transparent view is shown in a manner of the transparency less than 100%
Show;Alternatively, the face that grey or white etc. can have an impact to showing the display effect of the page is added on transparent view
Color;The embodiment of the present invention can also identify transparent view by other means, and this will not be repeated here.
Step 703, receive clipping region information input by user on transparent view;
Optionally, clipping region information includes:Cut size information and cutting coordinate information.
It should be noted that after loading transparent view of the embodiment of the present invention, user can determine to cut by touch control operation
Dimension information and cutting coordinate information;After loading transparent view, user is realized by touch control operation on transparent view and cut
Region determines;When transparent view receives the clipping region that user's touch control operation determines, it can be obtained and cut out by correlation technique
Cut the cut size information in region and cut coordinate information.The embodiment of the present invention assumes that clipping region is rectangle, then user can be with
The diagonal of clipping region is directly determined by 2 touch-controls;Alternatively, user can determine Crop Area respectively by clicking on twice
The diagonal in domain.If clipping region is irregular figure, user directly can determine irregular figure by slide;With
Irregular figure that family can also select to be stored in advance on interactive interface (include but not limited to, pentalpha, pentagon, etc.
Side triangle etc.) after, determine the geometric center and size of irregular figure;
The embodiment of the present invention is first shown by directly determining clipping region information in the display page relative to using painting canvas
After showing page interception acquisition source bitmap, then source bitmap cut and obtains purpose bitmap, reduce painting canvas to the display page into
The process of row interception, reduces the EMS memory occupation of terminal and produces the probability that memory overflows.
Step 704, the cutting parameter according to definite clipping region information setting painting canvas;
It should be noted that the technology that painting canvas is known to the skilled person, the embodiment of the present invention sets the sanction of painting canvas
Cutting the method for parameter can set the method for cutting parameter identical with correlation technique;I.e. with being determined in correlation technique on the bitmap of source
After the information of clipping region, as the setting for the cutting parameter for carrying out painting canvas according to definite clipping region information, do not do herein superfluous
State.
Step 705, the painting canvas set by completing cutting parameter cut the display page, to obtain purpose bitmap.
After the embodiment of the present invention completes painting canvas cutting parameter setting, directly can only it be passed through in the display page by painting canvas
Once cut just complete picture processing, reduce bitmap cut number, reduce terminal EMS memory occupation and memory overflow it is general
Rate.
Compared with correlation technique, technical solution of the embodiment of the present invention includes:In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;By completing the painting canvas of cutting parameter setting to showing the page
Cut, to obtain purpose bitmap.The embodiment of the present invention reduces bitmap and cuts step, reduces picture and cuts in terminal
The probability that the occupancy and memory deposited are overflowed.
Fig. 8 is yet another embodiment of the invention image processing method flow chart, as shown in figure 8, including:
Step 801, showing page reception cutting instruction;
The cutting instruction that step 802, basis receive, default input frame is loaded on the display page;
The embodiment of the present invention assumes that clipping region is rectangle, can include in the input frame of display page loading:For defeated
Enter the input frame of rectangular centre point coordinates and the coordinate for inputting rectangle length and width;Alternatively, for inputting rectangle wherein
The coordinate on one cornerwise two vertex.
Step 803, by input frame receive clipping region information input by user;
Optionally, clipping region information includes:Cut size information and cutting coordinate information.
Optionally, present invention method further includes:On the display page, display cut size information and cutting coordinate
Information.
The embodiment of the present invention, if receiving cut size information input by user and cutting by the default input frame
Coordinate information, then cut size information and cutting coordinate information are relatively more abstract, therefore, by showing cut size in the display page
Information and cutting coordinate information, the definite clipping region that householder can be used to see, contribute to user to carry out accurate picture cutting.
Showing the cut size information and cutting coordinate information can be shown in a manner of coordinate points, can also be shown on transparent view
Show.Clipping region is shown according to cut size information and cutting coordinate information on the display page, user can be intuitively
Determine clipping region, and be adjusted on this basis.
The embodiment of the present invention is first shown by directly determining clipping region information in the display page relative to using painting canvas
After showing page interception acquisition source bitmap, then source bitmap cut and obtains purpose bitmap, reduce painting canvas to the display page into
The process of row interception, reduces the EMS memory occupation of terminal and produces the probability that memory overflows.
Step 804, the cutting parameter according to definite clipping region information setting painting canvas;
It should be noted that the technology that painting canvas is known to the skilled person, the embodiment of the present invention sets the sanction of painting canvas
Cutting the method for parameter can set the method for cutting parameter identical with correlation technique;I.e. with being determined in correlation technique on the bitmap of source
After the information of clipping region, as the setting for the cutting parameter for carrying out painting canvas according to definite clipping region information, do not do herein superfluous
State.
Step 805, the painting canvas set by completing cutting parameter cut the display page, to obtain purpose bitmap.
After the embodiment of the present invention completes painting canvas cutting parameter setting, directly can only it be passed through in the display page by painting canvas
Once cut just complete picture processing, reduce bitmap cut number, reduce terminal EMS memory occupation and memory overflow it is general
Rate.
Compared with correlation technique, technical solution of the embodiment of the present invention includes:In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;By completing the painting canvas of cutting parameter setting to showing the page
Cut, to obtain purpose bitmap.The embodiment of the present invention reduces bitmap and cuts step, reduces picture and cuts in terminal
The probability that the occupancy and memory deposited are overflowed.
Fig. 9 is the structure diagram of terminal of the embodiment of the present invention, as shown in figure 9, the terminal includes processor 901, storage
Device 902 and communication bus 903;
The communication bus is used for realization the connection communication between processor and memory;
The processor is used to perform the picture processing program stored in memory, to realize following steps:
In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;
The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.
It should be noted that the embodiment of the present invention is in the display page by directly determining clipping region information, relative to adopting
After display page interception acquisition source bitmap is first carried out with painting canvas, then source bitmap cut and obtains purpose bitmap, reduce picture
The process that cloth intercepts the display page, reduces the EMS memory occupation of terminal and produces the probability that memory overflows.
In addition, the technology that painting canvas is known to the skilled person, the embodiment of the present invention sets the cutting parameter of painting canvas
Method can set the method for cutting parameter identical with correlation technique;I.e. with determining clipping region in correlation technique on the bitmap of source
After information, as the setting for the cutting parameter for carrying out painting canvas according to definite clipping region information, this will not be repeated here.
After the embodiment of the present invention completes painting canvas cutting parameter setting, directly can only it be passed through in the display page by painting canvas
Once cut just complete picture processing, reduce bitmap cut number, reduce terminal EMS memory occupation and memory overflow it is general
Rate.
Optionally, processor of the embodiment of the present invention is used to include the step of performing definite clipping region information:
Default transparent view is loaded on the display page;
By receiving cut size information input by user on the default transparent view and cutting coordinate information.
It should be noted that clipping region of embodiment of the present invention information directly by cut size information and can cut coordinate
Information determines;
In addition, after loading transparent view, user can be determined cut size information by touch control operation and cut coordinate letter
Breath;After loading transparent view, user realizes determining for clipping region on transparent view by touch control operation;Transparent view connects
When receiving the clipping region that user's touch control operation determines, can by correlation technique obtain clipping region cut size information and
Cut coordinate information.The embodiment of the present invention assumes that clipping region is rectangle, then user can directly determine to cut out by 2 touch-controls
Cut the diagonal in region;Alternatively, user can determine the diagonal of clipping region respectively by clicking on twice.If clipping region
For irregular figure, user directly can determine irregular figure by slide;User can also select to be stored in advance in
After irregular figure (including but not limited to, pentalpha, pentagon, equilateral triangle etc.) on interactive interface, determine not advise
The then geometric center and size of figure;
Optionally, processor of the embodiment of the present invention is used to perform loads default transparent view on the display page
Step includes:
After receiving cutting instruction, the transparent view is loaded on into the display page.
It should be noted that when transparent view is covered in the display page by the embodiment of the present invention, can be by identifiable
Block diagram is identified transparent view display.When the embodiment of the present invention carries out picture processing, transparent view is covered in the display page,
The block diagram that form is dotted line is shown in the fringe region of the display page;Certainly, the embodiment of the present invention can also use its other party
Formula is identified transparent view display;For example, before the information of definite clipping region, transparent view is with saturating less than 100%
The mode of lightness is shown;Alternatively, grey or white etc. are added on transparent view to be produced to showing the display effect of the page
The raw color influenced;The embodiment of the present invention can also identify transparent view by other means, and this will not be repeated here.
Optionally, processor of the embodiment of the present invention is used to include the step of performing definite clipping region information:
Default input frame is loaded on the display page, sanction input by user is received by the default input frame
Cut dimension information and cut coordinate information.
Optionally, loading default input frame on the display page includes:
After receiving cutting instruction, default input frame is loaded on the display page.
Assuming that clipping region is rectangle, the embodiment of the present invention can include in the input frame of display page loading:For defeated
Enter the input frame of rectangular centre point coordinates and the coordinate for inputting rectangle length and width;Alternatively, for inputting rectangle wherein
The coordinate on one cornerwise two vertex.
Optionally, processing of the embodiment of the present invention is additionally operable to perform the picture processing program that stores in memory, with realize with
Lower step:
When directly receiving cut size information input by user and cutting coordinate information, the method further includes:
On the display page, show the cut size information and cut coordinate information.
The embodiment of the present invention, if receiving cut size information input by user and cutting by the default input frame
Coordinate information, then cut size information and cutting coordinate information are relatively more abstract, therefore, by showing cut size in the display page
Information and cutting coordinate information, the definite clipping region that householder can be used to see, contribute to user to carry out accurate picture cutting.
Showing the cut size information and cutting coordinate information can be shown in a manner of coordinate points, can also be shown on transparent view
Show.Clipping region is shown according to cut size information and cutting coordinate information on the display page, user can be intuitively
Determine clipping region, and be adjusted on this basis.
Compared with correlation technique, technical solution of the embodiment of the present invention includes:In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;By completing the painting canvas of cutting parameter setting to showing the page
Cut, to obtain purpose bitmap.The embodiment of the present invention reduces bitmap and cuts step, reduces picture and cuts in terminal
The probability that the occupancy and memory deposited are overflowed.
The embodiment of the present invention also provides a kind of computer-readable recording medium, and the computer-readable recording medium storage has
One or more program, one or more of programs can be performed by one or more processor to realize above-mentioned picture
Processing method;Specifically, one or more program can be performed by one or more processor to realize:
In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;
The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.
It should be noted that the embodiment of the present invention is in the display page by directly determining clipping region information, relative to adopting
After display page interception acquisition source bitmap is first carried out with painting canvas, then source bitmap cut and obtains purpose bitmap, reduce picture
The process that cloth intercepts the display page, reduces the EMS memory occupation of terminal and produces the probability that memory overflows.
In addition, the technology that painting canvas is known to the skilled person, the embodiment of the present invention sets the cutting parameter of painting canvas
Method can set the method for cutting parameter identical with correlation technique;I.e. with determining clipping region in correlation technique on the bitmap of source
After information, as the setting for the cutting parameter for carrying out painting canvas according to definite clipping region information, this will not be repeated here.
After the embodiment of the present invention completes painting canvas cutting parameter setting, directly can only it be passed through in the display page by painting canvas
Once cut just complete picture processing, reduce bitmap cut number, reduce terminal EMS memory occupation and memory overflow it is general
Rate.
Optionally, one or more program of the embodiment of the present invention can be performed by one or more processor and determine to cut
The step of area information, includes:
Default transparent view is loaded on the display page;
By receiving cut size information input by user on the default transparent view and cutting coordinate information.
It should be noted that clipping region of embodiment of the present invention information directly by cut size information and can cut coordinate
Information determines;
In addition, after loading transparent view, user can be determined cut size information by touch control operation and cut coordinate letter
Breath;After loading transparent view, user realizes determining for clipping region on transparent view by touch control operation;Transparent view connects
When receiving the clipping region that user's touch control operation determines, can by correlation technique obtain clipping region cut size information and
Cut coordinate information.The embodiment of the present invention assumes that clipping region is rectangle, then user can directly determine to cut out by 2 touch-controls
Cut the diagonal in region;Alternatively, user can determine the diagonal of clipping region respectively by clicking on twice.If clipping region
For irregular figure, user directly can determine irregular figure by slide;User can also select to be stored in advance in
After irregular figure (including but not limited to, pentalpha, pentagon, equilateral triangle etc.) on interactive interface, determine not advise
The then geometric center and size of figure;
Optionally, one or more program of the embodiment of the present invention can be performed by one or more processor described aobvious
Show that the step of default transparent view is loaded on the page includes:
After receiving cutting instruction, the transparent view is loaded on into the display page.
It should be noted that when transparent view is covered in the display page by the embodiment of the present invention, can be by identifiable
Block diagram is identified transparent view display.When the embodiment of the present invention carries out picture processing, transparent view is covered in the display page,
The block diagram that form is dotted line is shown in the fringe region of the display page;Certainly, the embodiment of the present invention can also use its other party
Formula is identified transparent view display;For example, before the information of definite clipping region, transparent view is with saturating less than 100%
The mode of lightness is shown;Alternatively, grey or white etc. are added on transparent view to be produced to showing the display effect of the page
The raw color influenced;The embodiment of the present invention can also identify transparent view by other means, and this will not be repeated here.
Optionally, one or more program of the embodiment of the present invention can be performed by one or more processor and determine to cut
The step of area information, includes:
Default input frame is loaded on the display page, sanction input by user is received by the default input frame
Cut dimension information and cut coordinate information.
Optionally, loading default input frame on the display page includes:
After receiving cutting instruction, default input frame is loaded on the display page.
Assuming that clipping region is rectangle, the embodiment of the present invention can include in the input frame of display page loading:For defeated
Enter the input frame of rectangular centre point coordinates and the coordinate for inputting rectangle length and width;Alternatively, for inputting rectangle wherein
The coordinate on one cornerwise two vertex.
Optionally, one or more program of the embodiment of the present invention can be also performed with reality by one or more processor
It is existing:
When directly receiving cut size information input by user and cutting coordinate information, the method further includes:
On the display page, show the cut size information and cut coordinate information.
The embodiment of the present invention, if receiving cut size information input by user and cutting by the default input frame
Coordinate information, then cut size information and cutting coordinate information are relatively more abstract, therefore, by showing cut size in the display page
Information and cutting coordinate information, the definite clipping region that householder can be used to see, contribute to user to carry out accurate picture cutting.
Showing the cut size information and cutting coordinate information can be shown in a manner of coordinate points, can also be shown on transparent view
Show.Clipping region is shown according to cut size information and cutting coordinate information on the display page, user can be intuitively
Determine clipping region, and be adjusted on this basis.
Compared with correlation technique, technical solution of the embodiment of the present invention includes:In the display page, clipping region information is determined;
The cutting parameter of painting canvas is set according to definite clipping region information;By completing the painting canvas of cutting parameter setting to showing the page
Cut, to obtain purpose bitmap.The embodiment of the present invention reduces bitmap and cuts step, reduces picture and cuts in terminal
The probability that the occupancy and memory deposited are overflowed.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row
His property includes, so that process, method, article or device including a series of elements not only include those key elements, and
And other elements that are not explicitly listed are further included, or further include as this process, method, article or device institute inherently
Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this
Also there are other identical element in the process of key element, method, article or device.The embodiments of the present invention are only
Description, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on such understanding, technical scheme substantially in other words does the prior art
Going out the part of contribution can be embodied in the form of software product, which is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal (can be mobile phone, computer, services
Device, air conditioner, or network equipment etc.) perform method described in each embodiment of the present invention.
The embodiment of the present invention is described above in conjunction with attached drawing, but the invention is not limited in above-mentioned specific
Embodiment, above-mentioned embodiment is only schematical, rather than restricted, those of ordinary skill in the art
Under the enlightenment of the present invention, in the case of present inventive concept and scope of the claimed protection is not departed from, it can also make very much
Form, these are belonged within the protection of the present invention.
Claims (10)
- A kind of 1. image processing method, it is characterised in that including:In the display page, clipping region information is determined;The cutting parameter of painting canvas is set according to definite clipping region information;The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.
- 2. image processing method according to claim 1, it is characterised in that the definite clipping region information includes:Default transparent view is loaded on the display page;By receiving cut size information input by user on the default transparent view and cutting coordinate information.
- 3. image processing method according to claim 2, it is characterised in that the loading on the display page is default Transparent view include:After receiving cutting instruction, the transparent view is loaded on into the display page.
- 4. image processing method according to claim 1, it is characterised in that the definite clipping region information includes:Default input frame is loaded on the display page, cutting ruler input by user is received by the default input frame Very little information and cutting coordinate information.
- 5. image processing method according to claim 4, it is characterised in that described directly to receive cutting ruler input by user When very little information and cutting coordinate information, the image processing method further includes:On the display page, show the cut size information and cut coordinate information.
- 6. a kind of terminal, it is characterised in that the terminal includes processor, memory and communication bus;The communication bus is used for realization the connection communication between processor and memory;The processor is used to perform the picture processing program stored in memory, to realize following steps:In the display page, clipping region information is determined;The cutting parameter of painting canvas is set according to definite clipping region information;The painting canvas set by completing cutting parameter cuts the display page, to obtain purpose bitmap.
- 7. terminal according to claim 6, it is characterised in that the processor is used to perform definite clipping region information Step includes:Default transparent view is loaded on the display page;By receiving cut size information input by user on the default transparent view and cutting coordinate information.
- 8. terminal according to claim 7, it is characterised in that the processor is used to perform and adds on the display page The step of carrying default transparent view includes:After receiving cutting instruction, the transparent view is loaded on into the display page.
- 9. terminal according to claim 6, it is characterised in that the processor is used to perform definite clipping region information Step includes:Default input frame is loaded on the display page, cutting ruler input by user is received by the default input frame Very little information and cutting coordinate information.
- A kind of 10. computer-readable recording medium, it is characterised in that the computer-readable recording medium storage have one or Multiple programs, one or more of programs can be performed by one or more processor to realize that Claims 1 to 5 such as is appointed Image processing method described in one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711042445.6A CN108008991A (en) | 2017-10-30 | 2017-10-30 | A kind of image processing method, terminal and computer-readable recording medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711042445.6A CN108008991A (en) | 2017-10-30 | 2017-10-30 | A kind of image processing method, terminal and computer-readable recording medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108008991A true CN108008991A (en) | 2018-05-08 |
Family
ID=62052007
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711042445.6A Pending CN108008991A (en) | 2017-10-30 | 2017-10-30 | A kind of image processing method, terminal and computer-readable recording medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108008991A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110895457A (en) * | 2018-09-13 | 2020-03-20 | 浙江宇视科技有限公司 | Character display method and device and electronic equipment |
CN111355998A (en) * | 2019-07-23 | 2020-06-30 | 杭州海康威视数字技术股份有限公司 | Video processing method and device |
CN111414111A (en) * | 2019-01-04 | 2020-07-14 | 珠海金山办公软件有限公司 | Page cutting method and device |
WO2023005540A1 (en) * | 2021-07-30 | 2023-02-02 | 广州朗国电子科技股份有限公司 | Android whiteboard anti-flickering method and apparatus |
WO2023179398A1 (en) * | 2022-03-25 | 2023-09-28 | 追觅创新科技(苏州)有限公司 | Map display method, apparatus, storage medium and electronic apparatus |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521020A (en) * | 2011-10-26 | 2012-06-27 | 华为终端有限公司 | Application screen capture method and application screen capture device for mobile terminals |
CN104461283A (en) * | 2014-11-18 | 2015-03-25 | 小米科技有限责任公司 | Network view screen shooting method and device and electronic device |
CN105224315A (en) * | 2015-09-11 | 2016-01-06 | 北京金山安全软件有限公司 | Method and device for acquiring screen capture |
CN106598423A (en) * | 2016-11-03 | 2017-04-26 | 深圳市金立通信设备有限公司 | Screen capture method and terminal |
CN107229402A (en) * | 2017-05-22 | 2017-10-03 | 努比亚技术有限公司 | Dynamic screenshotss method, device and the readable storage medium storing program for executing of terminal |
-
2017
- 2017-10-30 CN CN201711042445.6A patent/CN108008991A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102521020A (en) * | 2011-10-26 | 2012-06-27 | 华为终端有限公司 | Application screen capture method and application screen capture device for mobile terminals |
CN104461283A (en) * | 2014-11-18 | 2015-03-25 | 小米科技有限责任公司 | Network view screen shooting method and device and electronic device |
CN105224315A (en) * | 2015-09-11 | 2016-01-06 | 北京金山安全软件有限公司 | Method and device for acquiring screen capture |
CN106598423A (en) * | 2016-11-03 | 2017-04-26 | 深圳市金立通信设备有限公司 | Screen capture method and terminal |
CN107229402A (en) * | 2017-05-22 | 2017-10-03 | 努比亚技术有限公司 | Dynamic screenshotss method, device and the readable storage medium storing program for executing of terminal |
Non-Patent Citations (1)
Title |
---|
十个雨点: "如何在Bitmap截取任意形状", 《简书》 * |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110895457A (en) * | 2018-09-13 | 2020-03-20 | 浙江宇视科技有限公司 | Character display method and device and electronic equipment |
CN110895457B (en) * | 2018-09-13 | 2024-02-02 | 浙江宇视科技有限公司 | Character display method and device and electronic equipment |
CN111414111A (en) * | 2019-01-04 | 2020-07-14 | 珠海金山办公软件有限公司 | Page cutting method and device |
CN111355998A (en) * | 2019-07-23 | 2020-06-30 | 杭州海康威视数字技术股份有限公司 | Video processing method and device |
CN111355998B (en) * | 2019-07-23 | 2022-04-05 | 杭州海康威视数字技术股份有限公司 | Video processing method and device |
EP4007287A4 (en) * | 2019-07-23 | 2022-09-07 | Hangzhou Hikvision Digital Technology Co., Ltd. | Video processing method, device, terminal, and storage medium |
WO2023005540A1 (en) * | 2021-07-30 | 2023-02-02 | 广州朗国电子科技股份有限公司 | Android whiteboard anti-flickering method and apparatus |
WO2023179398A1 (en) * | 2022-03-25 | 2023-09-28 | 追觅创新科技(苏州)有限公司 | Map display method, apparatus, storage medium and electronic apparatus |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107402709A (en) | A kind of multi-screen display method, terminal and computer-readable recording medium | |
CN107277216A (en) | A kind of volume adjusting method, terminal and computer-readable recording medium | |
CN108008991A (en) | A kind of image processing method, terminal and computer-readable recording medium | |
CN108196766A (en) | A kind of display interface processing method, terminal and computer readable storage medium | |
CN107678614A (en) | A kind of method, equipment and computer-readable recording medium for realizing information alert | |
CN107911540A (en) | Profile switching method and terminal device | |
CN107678829A (en) | A kind of application control method and mobile terminal | |
CN107580350A (en) | A kind of signal intensity switching method, equipment and computer-readable recording medium | |
CN108172161A (en) | Display methods, mobile terminal and computer readable storage medium based on flexible screen | |
CN107463324A (en) | A kind of image display method, mobile terminal and computer-readable recording medium | |
CN107992455A (en) | A kind of text handling method, terminal and computer-readable recording medium | |
CN107632757A (en) | A kind of terminal control method, terminal and computer-readable recording medium | |
CN107526493A (en) | A kind of small tool display methods, equipment and computer-readable recording medium | |
CN107153500A (en) | It is a kind of to realize the method and apparatus that image is shown | |
CN109799912A (en) | A kind of display control method, equipment and computer readable storage medium | |
CN108307105A (en) | A kind of image pickup method, terminal and computer readable storage medium | |
CN108600544A (en) | A kind of Single-hand control method and terminal | |
CN107888759A (en) | A kind of method, equipment and computer-readable recording medium realized information and sent | |
CN107957914A (en) | A kind of information processing method and mobile terminal | |
CN107682541A (en) | Audio control method, mobile terminal and the storage medium of screen prjection | |
CN107273024A (en) | A kind of method and apparatus for realizing application data processing | |
CN107566608A (en) | A kind of system air navigation aid, equipment and computer-readable recording medium | |
CN107908941A (en) | The operating method and mobile terminal of application program | |
CN108228047A (en) | A kind of video playing control method, terminal and computer readable storage medium | |
CN108419283A (en) | A kind of method and mobile terminal of WIFI hot spot scanning |
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: 20180508 |