CN104732481A - Image adjusting method and device - Google Patents

Image adjusting method and device Download PDF

Info

Publication number
CN104732481A
CN104732481A CN201510119474.2A CN201510119474A CN104732481A CN 104732481 A CN104732481 A CN 104732481A CN 201510119474 A CN201510119474 A CN 201510119474A CN 104732481 A CN104732481 A CN 104732481A
Authority
CN
China
Prior art keywords
image
adjustment
adjustment information
data
present
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510119474.2A
Other languages
Chinese (zh)
Inventor
刘照卿
鲁晓宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510119474.2A priority Critical patent/CN104732481A/en
Publication of CN104732481A publication Critical patent/CN104732481A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Processing (AREA)

Abstract

The invention provides an image adjusting method and device. According to the method, adjustment information is obtained through an obtained image to be adjusted so that the image can be adjusted according to the adjustment information, manual work is not needed, operation is simple, the accuracy is high, and therefore the image adjusting efficiency and reliability are improved.

Description

Image adjusting method and device
[technical field]
The present invention relates to image processing techniques, particularly relate to a kind of image adjusting method and device.
[background technology]
Along with the development of science and technology, people have increasing application demand to image, and this carries out some adjustment process with regard to needing to the image of original acquisition.Such as, can stretch zones specified by developer, stretch processing is carried out to appointment image, with the image after obtaining stretching.Other adjustment process also can adopt similar method.
But, due to the adjustment region needing developer to specify image, complicated operation, and easily make mistakes, thus result in the efficiency of Image Adjusting and the reduction of reliability.
[summary of the invention]
Many aspects of the present invention provide a kind of image adjusting method and device, in order to improve efficiency and the reliability of Image Adjusting.
An aspect of of the present present invention, provides a kind of image adjusting method, comprising:
Obtain image to be adjusted;
According to described image, obtain adjustment information;
According to described adjustment information, adjustment process is carried out to described image.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, comprise described adjustment information in the image formatted data of described image.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described adjustment information comprises adjustment categorical data and adjustment region data.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, described according to described adjustment information, carries out adjustment process, comprising described image:
According to described adjustment information, stretch processing or compression process are carried out to described image.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, described according to described adjustment information, carries out adjustment process, comprising described image:
According to described adjustment information, based on ios operating system, adjustment process is carried out to described image.
Another aspect of the present invention, provides a kind of image adjusting device, comprising:
Acquiring unit, for obtaining image to be adjusted;
Reading unit, for according to described image, obtains adjustment information;
Adjustment unit, for according to described adjustment information, carries out adjustment process to described image.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, comprise described adjustment information in the image formatted data of described image.
Aspect as above and arbitrary possible implementation, provide a kind of implementation further, and described adjustment information comprises adjustment categorical data and adjustment region data.
Aspect as above and arbitrary possible implementation, provide a kind of implementation, described adjustment unit further, specifically for
According to described adjustment information, stretch processing or compression process are carried out to described image.
Aspect as above and arbitrary possible implementation, provide a kind of implementation, described adjustment unit further, specifically for
According to described adjustment information, based on ios operating system, adjustment process is carried out to described image.
As shown from the above technical solution, the embodiment of the present invention is passed through according to obtained image to be adjusted, obtain adjustment information, make it possible to according to described adjustment information, adjustment process is carried out to described image, without the need to artificial participation, simple to operate, and accuracy is high, thus improve efficiency and the reliability of Image Adjusting.
In addition, adopt technical scheme provided by the present invention, owing to comprising adjustment information in the image formatted data of image, make developer without the need to the adjustment information of clear and definite image, once acquisition image, namely automatically can realize the adjustment of image, effectively can improve the efficiency of Image Adjusting.
[accompanying drawing explanation]
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
The schematic flow sheet of the image adjusting method that Fig. 1 provides for one embodiment of the invention;
The structural representation of the image adjusting device that Fig. 2 provides for another embodiment of the present invention.
[embodiment]
For making the object of the embodiment of the present invention, technical scheme and advantage clearly, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making other embodiments whole obtained under creative work prerequisite, belong to the scope of protection of the invention.
It should be noted that, terminal involved in the embodiment of the present invention can include but not limited to mobile phone, personal digital assistant (Personal Digital Assistant, PDA), radio hand-held equipment, panel computer (Tablet Computer), PC (Personal Computer, PC), MP3 player, MP4 player, wearable device (such as, intelligent glasses, intelligent watch, Intelligent bracelet etc.) etc.
In addition, term "and/or" herein, being only a kind of incidence relation describing affiliated partner, can there are three kinds of relations in expression, and such as, A and/or B, can represent: individualism A, exists A and B simultaneously, these three kinds of situations of individualism B.In addition, character "/" herein, general expression forward-backward correlation is to the relation liking a kind of "or".
The schematic flow sheet of the image adjusting method that Fig. 1 provides for one embodiment of the invention, as shown in Figure 1.
101, image to be adjusted is obtained.
102, according to described image, adjustment information is obtained.
103, according to described adjustment information, adjustment process is carried out to described image.
It should be noted that, the executive agent of 101 ~ 103 can for being positioned at the application of local terminal, or can also for being arranged on plug-in unit or SDK (Software Development Kit) (the SoftwareDevelopment Kit of the application being arranged in local terminal, the functional unit such as SDK), or can also for being arranged in the processing engine of network side server, or can also for being positioned at the distributed system of network side, the present embodiment is not particularly limited this.
Be understandable that, described application can be mounted in the local program (nativeApp) in terminal, or can also be a web page program (webApp) of browser in terminal, and the present embodiment does not limit this.
Like this, by according to obtained image to be adjusted, adjustment information is obtained, make it possible to according to described adjustment information, adjustment process is carried out, without the need to artificial participation to described image, simple to operate, and accuracy is high, thus improve efficiency and the reliability of Image Adjusting.
Alternatively, in one of the present embodiment possible implementation, in 101, specifically in the render process of the page, image to be adjusted can be obtained, play up process with what realize image.
The so-called page, also webpage or Web page can be called, can be based on HTML (Hypertext Markup Language) (HyperText Markup Language, HTML) webpage (Web Page) write, i.e. html page, or can also be the webpage write based on HTML and Java language, the i.e. java server page (Java Server Page, JSP), or can also be the webpage of other language compilation, the present embodiment be particularly limited this.Web page can comprise by one or more page-tag such as, HTML (Hypertext Markup Language) (HyperText Markup Language, HTML) label, JSP label etc., a display block of definition, be called page elements, such as, word, picture, hyperlink, button, input frame, combobox etc.
It should be noted that, the page involved in the present embodiment, can be the page of PC website, or can also be the page of mobile site, the present embodiment be particularly limited this.
In a concrete implementation procedure, in the process playing up a page, can the page primary resource of first downloading page, and then resolve and play up the page primary resource of the page, when being resolved to URL(uniform resource locator) (Uniform Resource Locator, the URL) of the image quoted in page primary resource, then can start to download image, like this, so-called image to be adjusted is just got.
Wherein, page primary resource is page source code, such as, and html source code or JSP source code etc.Page child resource is other resources in the page except page primary resource, and such as, picture, Streaming Media, JavaScript script file and CSS resource etc., the present embodiment is not particularly limited this.In these other resources, picture, JavaScript script file and CSS resource etc. are called as static resource.
So-called image, refers to and adopts certain picture format, the pixel of view data and image stored according to certain mode, the file formed, can be called image file again.
The form that the picture format of image and image store, bitmap (Bitmap can be included but not limited to, BMP) form, portable network image form (Portable Network Graphic Format, PNG), JPEG (joint photographic experts group) (Joint Photographic Experts Group, JPEG) form, exchangeable image file format (Exchangeable Image File Format, EXIF), the present embodiment is not particularly limited this.
The image formatted data of image, refers to the data of picture format, comprises view data and some other identification data, and such as, image starts mark etc.
Alternatively, in one of the present embodiment possible implementation, in the image formatted data of described image, described adjustment information can also be comprised further.Like this, then can read the image formatted data of described image, to obtain described adjustment information.
Particularly, described adjustment information can include but not limited to adjustment categorical data and adjustment region data.
Wherein,
Adjustment categorical data, be used to indicate the type of adjustment process, stretch adjustment or compression adjustment can be included but not limited to, such as, " 0 " represents the adjustment that stretches, " 1 " represents compression adjustment, or can also include but not limited to tiling type stretching adjustment, tension type stretching adjustment or compression adjustment, such as, " 00 " represents that tiling type stretches and adjusts, " 01 " represents that tension type stretching adjusts, and " 10 " represent compression adjustment, and the present embodiment is not particularly limited this.
Wherein, tiling type stretches adjustment, refers to the region of the adjustment process copied indicated by adjustment region data, fills the region that adjustment indicated by adjustment region data is final; Tension type stretching adjustment, refers to the region of the adjustment process indicated by stretching adjustment region data, fills the region that adjustment indicated by adjustment region data is final.
Adjustment region data, be used to indicate the region of adjustment process and adjust final region, can be a point, can also be maybe a region, the present embodiment be particularly limited this.Such as, the form of adjustment region data can be (top, left, bottom, right) as (20,5,10,5), represent from upper, left, down, right and drawn a diatom at image respectively, specify a rectangular area so just to an image.Part only inside rectangular area just can be adjusted, and the part outside rectangular area then keeps changing.
For PNG image, PNG image, signs (PNG filesignature) territory by the PNG file of 8 bytes and forms according to the data block (chunk) of more than 3 of ad hoc structure tissue.PNG image, defines the data block of two types, and one is called critical chunk (critical chunk), and this is the data block of standard, and another kind is called ancillary chunk (ancillary chunk), and this is optional data block.Critical chunk defines 4 normal data blocks, and each PNG image must comprise them, and PNG reads and writes software also all must support these data blocks.
Each data block can be made up of 4 territories, be respectively length (Length) territory, data block type code (Chunk Type Code) territory, data block data (Chunk Data) territory and cyclic redundancy check (Cyclic Redundancy Check, CRC) territory.Detailed description see related content of the prior art, can repeat no more herein.
In a concrete implementation procedure, adjustment information specifically can be included in the existing data block of PNG image, such as, in Chunk Data (data block data) territory of existing data block.
In the implementation procedure that another is concrete, adjustment information specifically can be included in the data block newly increased of PNG image, such as, in Chunk Data (data block data) territory of the data block newly increased.
Be understandable that, the image of other picture formats, such as, BMP format-pattern, jpeg image etc., also can carry out the realization of technical scheme with reference to above-mentioned concrete implementation procedure.
Alternatively, in one of the present embodiment possible implementation, in 103, specifically according to described adjustment information, stretch processing or compression process can be carried out to described image.
In a concrete implementation procedure, specifically can according to the type of the adjustment process adjusted indicated by categorical data, exchange the region of the adjustment process indicated by the numeric field data of main plot, carry out adjustment process, to obtain the adjustment image of the image size indicated by the final region of adjustment.
Alternatively, in one of the present embodiment possible implementation, in 103, specifically according to described adjustment information, based on ios operating system, adjustment process can be carried out to described image.
In the present embodiment, by according to obtained image to be adjusted, obtain adjustment information, make it possible to according to described adjustment information, adjustment process is carried out, without the need to artificial participation to described image, simple to operate, and accuracy is high, thus improve efficiency and the reliability of Image Adjusting.
In addition, adopt technical scheme provided by the present invention, owing to comprising adjustment information in the image formatted data of image, make developer without the need to the adjustment information of clear and definite image, once acquisition image, namely automatically can realize the adjustment of image, effectively can improve the efficiency of Image Adjusting.
It should be noted that, for aforesaid each embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in instructions all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
In the above-described embodiments, the description of each embodiment is all emphasized particularly on different fields, in certain embodiment, there is no the part described in detail, can see the associated description of other embodiments.
The structural representation of the image adjusting device that Fig. 2 provides for another embodiment of the present invention, as shown in Figure 2.The image adjusting device of the present embodiment can comprise acquiring unit 21, reading unit 22 and adjustment unit 23.Wherein, acquiring unit 21, for obtaining image to be adjusted; Reading unit 22, for according to described image, obtains adjustment information; Adjustment unit 23, for according to described adjustment information, carries out adjustment process to described image.
It should be noted that, the image adjusting device that the present embodiment provides can for being positioned at the application of local terminal, or can also for being arranged on plug-in unit or SDK (Software Development Kit) (the Software Development Kit of the application being arranged in local terminal, the functional unit such as SDK), or can also for being arranged in the processing engine of network side server, or can also for being positioned at the distributed system of network side, the present embodiment is not particularly limited this.
Be understandable that, described application can be mounted in the local program (nativeApp) in terminal, or can also be a web page program (webApp) of browser in terminal, and the present embodiment does not limit this.
Alternatively, in one of the present embodiment possible implementation, in the image formatted data of described image, described adjustment information can also be comprised further.Like this, described reading unit 22, then can read the image formatted data of described image, to obtain described adjustment information.
Particularly, described adjustment information can include but not limited to adjustment categorical data and adjustment region data.
Alternatively, in one of the present embodiment possible implementation, described adjustment unit 23, specifically may be used for according to described adjustment information, carries out stretch processing or compression process to described image.
Alternatively, in one of the present embodiment possible implementation, described adjustment unit 23, specifically may be used for according to described adjustment information, based on ios operating system, carries out adjustment process to described image.
It should be noted that, method in the embodiment that Fig. 1 is corresponding, the image adjusting device that can be provided by the present embodiment realizes.Detailed description see the related content in embodiment corresponding to Fig. 1, can repeat no more herein.
In the present embodiment, by the image to be adjusted that reading unit obtains according to acquiring unit, obtain adjustment information, make adjustment unit can according to described adjustment information, adjustment process is carried out to described image, without the need to artificial participation, simple to operate, and accuracy is high, thus improve efficiency and the reliability of Image Adjusting.
In addition, adopt technical scheme provided by the present invention, owing to comprising adjustment information in the image formatted data of image, make developer without the need to the adjustment information of clear and definite image, once acquisition image, namely automatically can realize the adjustment of image, effectively can improve the efficiency of Image Adjusting.
Those skilled in the art can be well understood to, and for convenience and simplicity of description, the system of foregoing description, the specific works process of device and unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
In several embodiment provided by the present invention, should be understood that, disclosed system, apparatus and method, can realize by another way.Such as, device embodiment described above is only schematic, such as, the division of described unit, be only a kind of logic function to divide, actual can have other dividing mode when realizing, such as multiple unit or assembly can in conjunction with or another system can be integrated into, or some features can be ignored, or do not perform.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, and the indirect coupling of device or unit or communication connection can be electrical, machinery or other form.
The described unit illustrated as separating component or can may not be and physically separates, and the parts as unit display can be or may not be physical location, namely can be positioned at a place, or also can be distributed in multiple network element.Some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, also can be that the independent physics of unit exists, also can two or more unit in a unit integrated.Above-mentioned integrated unit both can adopt the form of hardware to realize, and the form that hardware also can be adopted to add SFU software functional unit realizes.
The above-mentioned integrated unit realized with the form of SFU software functional unit, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) perform the part steps of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to previous embodiment to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein portion of techniques feature; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the spirit and scope of various embodiments of the present invention technical scheme.

Claims (10)

1. an image adjusting method, is characterized in that, comprising:
Obtain image to be adjusted;
According to described image, obtain adjustment information;
According to described adjustment information, adjustment process is carried out to described image.
2. method according to claim 1, is characterized in that, comprises described adjustment information in the image formatted data of described image.
3. method according to claim 1, is characterized in that, described adjustment information comprises adjustment categorical data and adjustment region data.
4. method according to claim 1, is characterized in that, described according to described adjustment information, carries out adjustment process, comprising described image:
According to described adjustment information, stretch processing or compression process are carried out to described image.
5. the method according to the arbitrary claim of Claims 1 to 4, is characterized in that, described according to described adjustment information, carries out adjustment process, comprising described image:
According to described adjustment information, based on ios operating system, adjustment process is carried out to described image.
6. an image adjusting device, is characterized in that, comprising:
Acquiring unit, for obtaining image to be adjusted;
Reading unit, for according to described image, obtains adjustment information;
Adjustment unit, for according to described adjustment information, carries out adjustment process to described image.
7. device according to claim 6, is characterized in that, comprises described adjustment information in the image formatted data of described image.
8. device according to claim 6, is characterized in that, described adjustment information comprises adjustment categorical data and adjustment region data.
9. device according to claim 6, is characterized in that, described adjustment unit, specifically for
According to described adjustment information, stretch processing or compression process are carried out to described image.
10. the device according to the arbitrary claim of claim 6 ~ 9, is characterized in that, described adjustment unit, specifically for
According to described adjustment information, based on ios operating system, adjustment process is carried out to described image.
CN201510119474.2A 2015-03-18 2015-03-18 Image adjusting method and device Pending CN104732481A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510119474.2A CN104732481A (en) 2015-03-18 2015-03-18 Image adjusting method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510119474.2A CN104732481A (en) 2015-03-18 2015-03-18 Image adjusting method and device

Publications (1)

Publication Number Publication Date
CN104732481A true CN104732481A (en) 2015-06-24

Family

ID=53456353

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510119474.2A Pending CN104732481A (en) 2015-03-18 2015-03-18 Image adjusting method and device

Country Status (1)

Country Link
CN (1) CN104732481A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256485A (en) * 2021-05-21 2021-08-13 百果园技术(新加坡)有限公司 Image stretching method, device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011191364A (en) * 2010-03-12 2011-09-29 Seiko Epson Corp Image display apparatus and image processing method
CN102567381A (en) * 2010-12-23 2012-07-11 腾讯科技(深圳)有限公司 Method and device for saving picture information
CN103530033A (en) * 2012-06-29 2014-01-22 三星电子株式会社 Method and apparatus for displaying content
CN104103085A (en) * 2013-04-11 2014-10-15 三星电子株式会社 Objects in screen images

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011191364A (en) * 2010-03-12 2011-09-29 Seiko Epson Corp Image display apparatus and image processing method
CN102567381A (en) * 2010-12-23 2012-07-11 腾讯科技(深圳)有限公司 Method and device for saving picture information
CN103530033A (en) * 2012-06-29 2014-01-22 三星电子株式会社 Method and apparatus for displaying content
CN104103085A (en) * 2013-04-11 2014-10-15 三星电子株式会社 Objects in screen images

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113256485A (en) * 2021-05-21 2021-08-13 百果园技术(新加坡)有限公司 Image stretching method, device, electronic equipment and storage medium
CN113256485B (en) * 2021-05-21 2024-01-30 百果园技术(新加坡)有限公司 Image stretching method, device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109597617B (en) Method and device for quickly generating service page based on template
CN102663126B (en) Method and device for displaying webpage in mobile terminal
CN103593196A (en) Page layout self-adaptation method and device
CN104965764A (en) Static resource processing method and apparatus
CN103353878A (en) Method for displaying files of different file formats in webpage
CN104731869A (en) Page display method and device
CN102915308A (en) Method and device for rendering pages
CN110263279B (en) Page generation method and device, electronic equipment and computer readable storage medium
CN111506844A (en) Page processing method, equipment and computer storage medium
US20140053051A1 (en) Application server and method for editing drawings of webpage
CN107451163B (en) Animation display method and device
CN102253986A (en) Method and device for improving webpage displaying effect in multiple terminals
CN103699652A (en) Webpage access method and webpage access system
CN104156421A (en) Method, device and system for displaying page
CN105260459A (en) Search method and apparatus
CN103248647A (en) Method and server providing cross-platform book reading
CN103605521A (en) Method and device for realizing interface apposition
CN103488508A (en) Browser working method, browser and terminal equipment
KR102290380B1 (en) Page construction method, apparatus, device and non-volatile computer storage medium
CN104732481A (en) Image adjusting method and device
CN106919375B (en) Screen self-adaption method and system on mobile terminal equipment
CN111143749A (en) Webpage display method, device, equipment and storage medium
CN108133029B (en) Map element adjusting method, device and equipment and computer-readable storage medium
CN103139298A (en) Method for transmitting network data and device
CN106682009B (en) Method and device for generating EPUB browser page and mobile phone

Legal Events

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

Application publication date: 20150624