CN110349227A - A kind of method and device of nine figure of compression point - Google Patents

A kind of method and device of nine figure of compression point Download PDF

Info

Publication number
CN110349227A
CN110349227A CN201910572280.6A CN201910572280A CN110349227A CN 110349227 A CN110349227 A CN 110349227A CN 201910572280 A CN201910572280 A CN 201910572280A CN 110349227 A CN110349227 A CN 110349227A
Authority
CN
China
Prior art keywords
region
transversal stretching
point
longitudinal extension
stretching region
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.)
Granted
Application number
CN201910572280.6A
Other languages
Chinese (zh)
Other versions
CN110349227B (en
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.)
Advanced New Technologies Co Ltd
Advantageous New Technologies Co Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910572280.6A priority Critical patent/CN110349227B/en
Publication of CN110349227A publication Critical patent/CN110349227A/en
Application granted granted Critical
Publication of CN110349227B publication Critical patent/CN110349227B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T9/00Image coding

Abstract

Disclose a kind of method and device of nine figure of compression point.For putting any transversal stretching region of nine figures, for any pixel point in the transversal stretching region, if the color of the pixel is both identical as the color of the pixel on the pixel left side, it is again identical as the color of pixel on the right of the pixel, then illustrate that the transversal stretching region has lateral compressibility, in this way, transverse compression can be carried out to the transversal stretching region, to reduce the lateral dimension of nine figures of point.Similarly, the longitudinal size of a little nine figures can also be reduced.

Description

A kind of method and device of nine figure of compression point
Technical field
This specification embodiment is related to a kind of method and device of nine figure of information technology field more particularly to compression point.
Background technique
Point nine figures (the entitled .9.png of suffix) is a kind of picture format that Android system is supported, by manually scheming in png Piece is drawn to obtain on basis.Specifically, artificial to need to draw the black line of certain length in the surrounding of png picture, to inform When rendering the png picture, which region can be stretched Android system, which region should keep original ratio.In this way, peace Tall and erect nine figure of system point of use carries out picture rendering (it is flexible to carry out picture according to the screen size of mobile phone), not will lead to rendering Picture distortion out.
In engineering practice, the size for putting nine figures is smaller, can more save storage resource.
Summary of the invention
In order to reduce the size of a little nine figures, storage resource is saved, this specification embodiment provides a kind of nine figure of compression point Method and device, technical solution are as follows:
According to the 1st of this specification embodiment the aspect, a kind of method of nine figure of compression point is provided, for nine figure of compression point Lateral dimension, which comprises
Determine each compressible transversal stretching region in nine figure of point;
From each compressible transversal stretching region determined, at least one transversal stretching region is selected;
For each transversal stretching region of selection, the lateral dimension in the transversal stretching region is compressed, and adjust the transverse direction The size of the corresponding transversal stretching marking line of stretching region, so that after the signable compression out of the transversal stretching marking line adjusted The transversal stretching region;
Wherein it is determined that each compressible transversal stretching region in nine figure of point, comprising:
For each transversal stretching marking line of nine figure of point, determines and correspond to the transversal stretching mark in nine figure of point The transversal stretching region of timberline;
Judge whether the transversal stretching region meets the first specified requirements;First specified requirements is to stretch in the transverse direction It is identical with the color of each pixel in a line in contracting region;
If so, determining that the transversal stretching region is compressible.
According to the 2nd of this specification embodiment the aspect, a kind of method of nine figure of compression point is provided, for nine figure of compression point Longitudinal size, which comprises
Determine each compressible longitudinal extension region in nine figure of point;
From the compressible each longitudinal extension region determined, at least one longitudinal extension region is selected;
For the stretching region longitudinally in each of selection, the longitudinal size in the longitudinal extension region is compressed, and adjusts the longitudinal direction The size of the corresponding longitudinal extension marking line of stretching region, so that after the signable compression out of the longitudinal extension marking line adjusted The longitudinal extension region;
Wherein it is determined that each compressible longitudinal extension region in nine figure of point, comprising:
For the marking line that stretches longitudinally in each of nine figure of point, determines and correspond to the longitudinal extension mark in nine figure of point The longitudinal extension region of timberline;
Judge whether the longitudinal extension region meets the second specified requirements;Second specified requirements is to stretch in the longitudinal direction In contracting region, the color of each pixel in same row is identical;
If so, determining that the longitudinal extension region is compressible.
According to the 3rd of this specification embodiment the aspect, a kind of device of nine figure of compression point is provided, for nine figure of compression point Lateral dimension, described device include:
Determining module determines each compressible transversal stretching region in nine figure of point;
Selecting module selects at least one transversal stretching region from each compressible transversal stretching region determined;
Compression module compresses the lateral dimension in the transversal stretching region, and adjust for each transversal stretching region of selection The size of the corresponding transversal stretching marking line in the whole transversal stretching region, so that the transversal stretching marking line adjusted is signable Compressed transversal stretching region out;
Wherein, the determining module includes:
It determines submodule, for each transversal stretching marking line of nine figure of point, determines and correspond in nine figure of point The transversal stretching region of the transversal stretching marking line;
Judgement processing submodule, judges whether the transversal stretching region meets the first specified requirements, the first specified item Part is, identical with the color of each pixel in a line in the transversal stretching region;If so, determining the transversal stretching Region is compressible.
According to the 4th of this specification embodiment the aspect, a kind of device of nine figure of compression point is provided, for nine figure of compression point Longitudinal size, described device include:
Determining module determines each compressible longitudinal extension region in nine figure of point;
Selecting module selects at least one longitudinal extension region from the compressible each longitudinal extension region determined;
Compression module compresses the longitudinal size in the longitudinal extension region for the stretching region longitudinally in each of selection, and adjusts The size of the corresponding longitudinal extension marking line in the whole longitudinal extension region, so that the longitudinal extension marking line adjusted is signable Compressed longitudinal extension region out;
Wherein, the determining module includes:
It determines submodule, for the marking line that stretches longitudinally in each of nine figure of point, determines and correspond in nine figure of point The longitudinal extension region of the longitudinal extension marking line;
Judging treatmenting module, judges whether the longitudinal extension region meets the second specified requirements, second specified requirements For in the longitudinal extension region, the color of each pixel in same row is identical;If so, determining the longitudinal extension area Domain is compressible.
Technical solution provided by this specification embodiment, for putting any transversal stretching region of nine figures, if It is identical with the color of each pixel in a line in the transversal stretching region, then illustrate that the transversal stretching region has cross To compressibility, in this way, transverse compression can be carried out to the transversal stretching region, to reduce the lateral dimension of nine figures of point.Similarly, The longitudinal size of a little nine figures can also be reduced.By this specification embodiment, the size for nine figure of point manually drawn can be compressed Size promotes picture compression rate.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not This specification embodiment can be limited.
In addition, any embodiment in this specification embodiment does not need to reach above-mentioned whole effects.
Detailed description of the invention
In order to illustrate more clearly of this specification embodiment or technical solution in the prior art, below will to embodiment or Attached drawing needed to be used in the description of the prior art is briefly described, it should be apparent that, the accompanying drawings in the following description is only The some embodiments recorded in this specification embodiment for those of ordinary skill in the art can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is that nine diagram of point is intended to;
Fig. 2 a and 2b are the schematic diagrames of stretching region in nine figures of point;
Fig. 3 is a kind of flow diagram of the method for nine figure of compression point that this specification embodiment provides;
Fig. 4 is the schematic diagram that this illustrates nine figure of transverse compression point that embodiment provides;
Fig. 5 is a kind of flow diagram of the method for nine figure of compression point that this specification embodiment provides;
Fig. 6 is a kind of structural schematic diagram of the device for nine figure of compression point that this specification embodiment provides;
Fig. 7 is the structural schematic diagram of the device for nine figure of another compression point that this specification embodiment provides;
Fig. 8 is the structural schematic diagram for configuring a kind of equipment of this specification embodiment method.
Specific embodiment
The principle of nine figures of point is introduced herein.Fig. 1 is that nine diagram of point is intended to.As shown in Figure 1, by manually scheming in png The surrounding of piece draws the marking line of four black.Wherein, the effect of two transversal stretching marking lines of top is to indicate png figure Piece horizontally telescopic regional scope;The effect of the longitudinal extension marking line on the left side is to indicate png picture in the longitudinal direction Telescopic regional scope;The effect of spacing marking line is to indicate using png picture as background, in the longitudinal direction in the longitudinal direction on the right The regional scope of displayable content;The effect of spacing marking line is indicated using png picture as background, in cross in following transverse direction The regional scope of upward displayable content.
It should be noted that the emphasis paid close attention to herein be point nine figures size and how nine figure of non-dots shows content, therefore, It can't excessively refer to spacing marking line and spacing marking line in transverse direction in longitudinal direction.
A and 2b referring to fig. 2 can determine corresponding transversal stretching area according to each transversal stretching marking line of nine figures of point Domain can determine corresponding longitudinal extension region according to the marking line that stretches longitudinally in each of nine figures of point.Android system needs to carry out When picture renders, the size for needing the picture rendered can be determined according to the screen size of mobile phone first, then rendering as needed Picture size (lateral dimension and longitudinal size), size adjusting is carried out to nine figures of point and (transversal stretching and/or longitudinal is stretched Contracting).When stretching to nine figures of point, horizontally can only stretch transversal stretching region, and can only stretch longitudinal stretch in the longitudinal direction Contracting region.
Since nine figures of point can actually be considered as the rendering template of picture used in Android system, the size of point nine figures itself Size is not to influence the key factor of the size of picture rendered, therefore, how in nine figure of retention point necessary letter Under the premise of breath, reduces the size of nine figures of point to save storage resource, be assistant officer's technical problem to be solved in an engineering practice.
To solve this technical problem, it in one or more embodiments of this specification, automatically attempts to manually drawing To nine figure of point compressed, if it find that point nine figures in there are unnecessary redundancies, just redundancy is deleted, with press The size of nine figure of point reduction.
Specifically, for any transversal stretching region for putting nine figures, if in the transversal stretching region, it is same The color of each pixel on row is identical, then explanation, which carries out transverse compression to the transversal stretching region, not will lead to a little nine figure Necessary information (will not influence Android system and transversal stretching is carried out to nine figures of point) is lost, it therefore, can be to the transversal stretching area Domain carries out transverse compression, and the pixel reduce is redundancy.
Similarly, for putting any longitudinal extension region of nine figures, if in the longitudinal extension region, in a line Each pixel color it is identical, then explanation to the longitudinal extension region carry out longitudinal compression not will lead to a little nine figures lose Necessary information (will not influence Android system to point nine figures carry out longitudinal extension), therefore, can to the longitudinal extension region into Row longitudinal compression, the pixel reduce are redundancy.
In order to make those skilled in the art more fully understand the technical solution in this specification embodiment, below in conjunction with this Attached drawing in specification embodiment is described in detail the technical solution in this specification embodiment, it is clear that described Embodiment is only a part of the embodiment of this specification, instead of all the embodiments.The embodiment of base in this manual, Those of ordinary skill in the art's every other embodiment obtained, all should belong to the range of protection.
Below in conjunction with attached drawing 3 and attached drawing 5, the technical program is described in detail.
The executing subject of method shown in Fig. 3 and method shown in Fig. 5 can be realization nine figures of point compression purpose and develop Nine figure condensing routines of point.In practical applications, the nine figure condensing routine of point can integrate in nine figure drawing programs of point, as One functional module of nine figure drawing programs of point.
In practical applications, after user draws to obtain a little nine figures based on png picture, nine figures of point can be input to a little nine figure Condensing routine judges whether to compress nine figures of point, if it can, carrying out nine figures of point by putting nine figure condensing routines Compression, compressed nine figure of point is exported to user.
It should be noted that method shown in Fig. 3 is used for the lateral dimension of nine figure of compression point, method shown in fig. 5 is used for The longitudinal size of nine figure of compression point.Fig. 3 can be realized independently with method shown in fig. 5, can also be implemented in combination with and (both be attempted The lateral dimension of nine figure of compression point, and attempt the longitudinal size of nine figure of compression point).
Fig. 3 is a kind of flow diagram of the method for nine figure of compression point that this specification embodiment provides, including following step It is rapid:
S300: each compressible transversal stretching region in nine figure of point is determined.
It should be noted that nine figures of point are generally made of the png picture of rectangle and the black marking line of png picture surrounding. Nine figures of point can have 1 transversal stretching marking line, it is possible to have more than 1 transversal stretching marking line.Each transversal stretching The corresponding horizontal line stretching region of marking line is also rectangle.
In special circumstances, the size for putting the transversal stretching marking line of nine figures can be 1 pixel, in this way, transversal stretching The size of marking line is specially a pixel, and the lateral dimension in transversal stretching region correspondingly is specially a pixel, in shape A trunk line in a little nine figures is shown as in formula.It should be appreciated that transversal stretching line and transversal stretching region described herein Concept enumerate the special circumstances.
In this specification embodiment, each compressible transversal stretching region in nine figure of point is determined, implement are as follows: For each transversal stretching marking line of nine figure of point, the cross for corresponding to the transversal stretching marking line in nine figure of point is determined To stretching region;Judge whether the transversal stretching region meets the first specified requirements;If so, determining that the transversal stretching region can Compression, if not, it is determined that the transversal stretching region is incompressible.
Wherein, first specified requirements is, in the transversal stretching region, with the color of each pixel in a line It is identical.
The principle being related to herein to the first specified requirements is illustrated.Android system is carrying out picture rendering based on nine figures of point When, the transversal stretching Region extension and shrinking of nine figures can will be horizontally put to suitably sized according to screen size.If laterally stretched Any color for traversing the pixel on line in contracting region is all identical, then illustrating the cross in transversal stretching region in a little nine figures Even if being compressed to size, necessary information will not be lost, that is, will not influence Android system and transversal stretching region is carried out laterally It is flexible.
Based on the above principles, the transversal stretching region for meeting the first specified requirements is the cross with lateral compressibility To stretching region.
It is emphasized that also just not compressed if the lateral dimension in transversal stretching region is exactly originally 1 pixel Necessity, therefore, it is this in special circumstances, be considered as transversal stretching region and be unsatisfactory for first specified requirements.
S302: from each compressible transversal stretching region determined, at least one transversal stretching region is selected.
In this specification embodiment, if there is more than one meets the transversal stretching region of the first specified requirements, then may be used To select one or more transversal stretchings region to be compressed.The standard of selection can be set according to actual needs, specifically can be with It is all transverse compressed grooves for meeting the first specified requirements of selection.
S304: for each transversal stretching region of selection, the lateral dimension in the transversal stretching region is compressed, and adjusting should The size of the corresponding transversal stretching marking line in transversal stretching region.
It, can be by the transversal stretching region for each transversal stretching region of selection in this specification embodiment Lateral dimension is suitably compressed.It is possible to further by 1 pixel of lateral dimension boil down in the transversal stretching region, in this way, Can actually be collapsed into a little nine figures one of the transversal stretching region traverses line.
In addition it is also necessary to according to the compressed transversal stretching region, to adjust correspondingly transversal stretching marking line, so that The transversal stretching marking line adjusted still is able to indicate the compressed transversal stretching region.
Fig. 4 is the schematic diagram that this illustrates nine figure of transverse compression point that embodiment provides.It should be noted that nine figures of point is vertical Into flexible marking line, longitudinal direction spacing marking line, spacing marking line is not shown in FIG. 4 in transverse direction.It is assumed that point Two transversal stretching regions of nine figures all meet the first specified requirements, and the lateral dimension of each transverse compressed groove is compressed to 1 pixel.The transversal stretching marking line collapse of nine figure of point after transverse compression is black pixel point, and corresponding transversal stretching region collapses It is condensed to the wide trunk line of 1 pixel.
With continued reference to Fig. 4.Android system can still carry out picture rendering using nine figure of point after transverse compression.It is specific and Speech, Android system can determine the actual size for needing the picture rendered according to the size of mobile phone screen.For example, after transverse compression The lateral dimension (i.e. width) of nine figure of point be 10 pixels, and Android system needs to be rendered lateral dimension based on nine figures of point and be The picture of 20 pixels.Android system can be by the lateral dimension in the transversal stretching region one (lateral dimension is 1 pixel) on the left side 11 pixels are stretched as, the transversal stretching region two (lateral dimension is 1 pixel) on the right are not processed.Android system can also incite somebody to action The lateral dimension in the transversal stretching region one (lateral dimension is 1 pixel) on the left side is stretched as 6 pixels, by the transversal stretching area on the right The lateral dimension in domain two (lateral dimension is 1 pixel) is also stretched as 6 pixels.Then, the lateral dimension for the picture that final rendering goes out For 20 pixels.
Fig. 5 is a kind of flow diagram of the method for nine figure of compression point that this specification embodiment provides, including following step It is rapid:
S500: each compressible longitudinal extension region in nine figure of point is determined.
Determine each compressible longitudinal extension region in nine figure of point, comprising: longitudinally in each for nine figure of point Flexible marking line determines the longitudinal extension region for corresponding to the longitudinal extension marking line in nine figure of point;Judge that the longitudinal direction is stretched Whether contracting region meets the second specified requirements;If so, determining that the longitudinal extension region is compressible.Wherein, described second is specified Condition is, in the longitudinal extension region, the color of each pixel in same row is identical.
S502: from the compressible each longitudinal extension region determined, at least one longitudinal extension region is selected.
It specifically can choose all longitudinal compression regions for meeting second specified requirements.
S504: for the stretching region longitudinally in each of selection, the longitudinal size in the longitudinal extension region is compressed, and adjusting should The size of the corresponding longitudinal extension marking line in longitudinal extension region.
It can be specifically directed to the stretching region longitudinally in each of selection, by the longitudinal size boil down to 1 in the longitudinal extension region Pixel.
Since method shown in fig. 5 and method shown in Fig. 3 are consistent in principle, it is not repeated to illustrate.
By one or more embodiments of this specification, the size that can further compress nine figure of point manually drawn is big It is small, promote picture compression rate.
It should also be noted that, in practice, user then needs if it is intended to make the size for nine figure of point drawn smaller Before nine figure of graphical pointv, png picture is cut manually, redundancy section is reduced, then the png picture after cutting Surrounding draw marking line.However, this mode is more troublesome for a user, also, manually referring to the precision of picture not yet Height cannot achieve optimal cutting effect.
In this specification embodiment, user does not have to consider how to obtain smallest size of nine figure of point, but by putting nine figures Condensing routine automatically compresses nine figures of point, can farthest remove the redundancy in a little nine figures, and it is empty to save storage Between.
In addition, some nine figures of point may be merely able to when method shown in Fig. 3 is used in combination with method shown in fig. 5 It is compressed, and cannot be compressed in transverse direction in the longitudinal direction;Some nine figures of point may be merely able to be compressed in the longitudinal direction, and It cannot horizontally be compressed;Some nine figures of point can may horizontally be compressed, and can also be compressed in the longitudinal direction.
For can horizontally compress, nine figure of point that can be also compressed in the longitudinal direction can in compression sequence Transverse compression is carried out to first carry out method shown in Fig. 3, then executes method shown in fig. 5 and carries out longitudinal compression.It is of course also possible to Longitudinal compression is first carried out, then carries out transverse compression.
Fig. 6 is a kind of device for nine figure of compression point that this specification embodiment provides, the lateral ruler for nine figure of compression point Very little, described device includes:
Determining module 601 determines each compressible transversal stretching region in nine figure of point;
Selecting module 602 selects at least one transversal stretching area from each compressible transversal stretching region determined Domain;
Compression module 603 compresses the lateral dimension in the transversal stretching region for each transversal stretching region of selection, And the size of the corresponding transversal stretching marking line in the transversal stretching region is adjusted, so that the transversal stretching marking line adjusted can Indicate the compressed transversal stretching region;
Wherein, the determining module includes:
Determine submodule 6011, for each transversal stretching marking line of nine figure of point, it is right in nine figure of point to determine It should be in the transversal stretching region of the transversal stretching marking line;
Judgement processing submodule 6012, judges whether the transversal stretching region meets the first specified requirements, and described first refers to Fixed condition is, identical with the color of each pixel in a line in the transversal stretching region;If so, determining the transverse direction Stretching region is compressible.
The selecting module 602 selects all compressible transverse compressed grooves.
The compression module 603, for each transversal stretching region of selection, by the lateral dimension in the transversal stretching region 1 pixel of boil down to.
Fig. 7 is the device for nine figure of another compression point that this specification embodiment provides, the longitudinal direction for nine figure of compression point Size, described device include:
Determining module 701 determines each compressible longitudinal extension region in nine figure of point;
Selecting module 702 selects at least one longitudinal extension area from the compressible each longitudinal extension region determined Domain;
Compression module 703 compresses the longitudinal size in the longitudinal extension region for the stretching region longitudinally in each of selection, And the size of the corresponding longitudinal extension marking line in the longitudinal extension region is adjusted, so that the longitudinal extension marking line adjusted can Indicate the compressed longitudinal extension region;
Wherein, the determining module includes:
Determine submodule 7011, for the marking line that stretches longitudinally in each of nine figure of point, it is right in nine figure of point to determine It should be in the longitudinal extension region of the longitudinal extension marking line;
Judgement processing submodule 7012, judges whether the longitudinal extension region meets the second specified requirements, and described second refers to Fixed condition is, in the longitudinal extension region, the color of each pixel in same row is identical;If so, determining the longitudinal direction Stretching region is compressible.
The selecting module 702 selects all compressible longitudinal compression regions.
The compression module 703, for the stretching region longitudinally in each of selection, by the longitudinal size in the longitudinal extension region 1 pixel of boil down to.
This specification embodiment also provides a kind of computer equipment, includes at least memory, processor and is stored in On reservoir and the computer program that can run on a processor, wherein processor realizes the institute of Fig. 3 and/or 5 when executing described program The method shown.
Fig. 8 shows one kind provided by this specification embodiment and more specifically calculates device hardware structural schematic diagram, The equipment may include: processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050.Wherein processor 1010, memory 1020, input/output interface 1030 and communication interface 1040 are real by bus 1050 The now communication connection inside equipment each other.
Processor 1010 can use general CPU (Central Processing Unit, central processing unit), micro- place Reason device, application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or one Or the modes such as multiple integrated circuits are realized, for executing relative program, to realize technical side provided by this specification embodiment Case.
Memory 1020 can use ROM (Read Only Memory, read-only memory), RAM (Random Access Memory, random access memory), static storage device, the forms such as dynamic memory realize.Memory 1020 can store Operating system and other applications are realizing technical solution provided by this specification embodiment by software or firmware When, relevant program code is stored in memory 1020, and execution is called by processor 1010.
Input/output interface 1030 is for connecting input/output module, to realize information input and output.Input and output/ Module can be used as component Configuration (not shown) in a device, can also be external in equipment to provide corresponding function.Wherein Input equipment may include keyboard, mouse, touch screen, microphone, various kinds of sensors etc., output equipment may include display, Loudspeaker, vibrator, indicator light etc..
Communication interface 1040 is used for connection communication module (not shown), to realize the communication of this equipment and other equipment Interaction.Wherein communication module can be realized by wired mode (such as USB, cable etc.) and be communicated, can also be wirelessly (such as mobile network, WIFI, bluetooth etc.) realizes communication.
Bus 1050 include an access, equipment various components (such as processor 1010, memory 1020, input/it is defeated Outgoing interface 1030 and communication interface 1040) between transmit information.
It should be noted that although above equipment illustrates only processor 1010, memory 1020, input/output interface 1030, communication interface 1040 and bus 1050, but in the specific implementation process, which can also include realizing normal fortune Other assemblies necessary to row.In addition, it will be appreciated by those skilled in the art that, it can also be only comprising real in above equipment Component necessary to existing this specification example scheme, without including all components shown in figure.
This specification embodiment also provides a kind of computer readable storage medium, is stored thereon with computer program, the journey Method shown in Fig. 3 and/or 5 is realized when sequence is executed by processor.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology come realize information store.Information can be computer readable instructions, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase change memory (PRAM), static random access memory (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), flash memory or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storage, magnetic cassettes, tape magnetic disk storage or other magnetic storage devices Or any other non-transmission medium, can be used for storage can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as the data-signal and carrier wave of modulation.
As seen through the above description of the embodiments, those skilled in the art can be understood that this specification Embodiment can be realized by means of software and necessary general hardware platform.Based on this understanding, this specification is implemented Substantially the part that contributes to existing technology can be embodied in the form of software products the technical solution of example in other words, The computer software product can store in storage medium, such as ROM/RAM, magnetic disk, CD, including some instructions are to make It obtains a computer equipment (can be personal computer, service equipment or the network equipment etc.) and executes this specification embodiment Method described in certain parts of each embodiment or embodiment.
System, method, module or the unit that above-described embodiment illustrates can specifically realize by computer chip or entity, Or it is realized by the product with certain function.A kind of typically to realize that equipment is computer, the concrete form of computer can To be personal computer, laptop computer, cellular phone, camera phone, smart phone, personal digital assistant, media play In device, navigation equipment, E-mail receiver/send equipment, game console, tablet computer, wearable device or these equipment The combination of any several equipment.
All the embodiments in this specification are described in a progressive manner, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for method reality For applying example, since it is substantially similar to the method embodiment, so describing fairly simple, related place is referring to embodiment of the method Part explanation.Embodiment of the method described above is only schematical, wherein described be used as separate part description Module may or may not be physically separated, can be each module when implementing this specification example scheme Function realize in the same or multiple software and or hardware.Can also select according to the actual needs part therein or Person's whole module achieves the purpose of the solution of this embodiment.Those of ordinary skill in the art are not the case where making the creative labor Under, it can it understands and implements.
The above is only the specific embodiment of this specification embodiment, it is noted that for the general of the art For logical technical staff, under the premise of not departing from this specification embodiment principle, several improvements and modifications can also be made, this A little improvements and modifications also should be regarded as the protection scope of this specification embodiment.

Claims (13)

1. a kind of method of nine figure of compression point, the lateral dimension for nine figure of compression point, which comprises
Determine each compressible transversal stretching region in nine figure of point;
From each compressible transversal stretching region determined, at least one transversal stretching region is selected;
For each transversal stretching region of selection, the lateral dimension in the transversal stretching region is compressed, and adjust the transversal stretching The size of the corresponding transversal stretching marking line in region so that the transversal stretching marking line adjusted it is signable go out it is compressed should Transversal stretching region;
Wherein it is determined that each compressible transversal stretching region in nine figure of point, comprising:
For each transversal stretching marking line of nine figure of point, determines and correspond to the transversal stretching marking line in nine figure of point Transversal stretching region;
Judge whether the transversal stretching region meets the first specified requirements;First specified requirements is, in the transversal stretching area It is identical with the color of each pixel in a line in domain;
If so, determining that the transversal stretching region is compressible.
2. the method as described in claim 1 selects at least one cross from each compressible transversal stretching region determined To stretching region, specifically include:
Select all compressible transverse compressed grooves.
3. the method as described in claim 1 compresses the cross in the transversal stretching region for each transversal stretching region of selection To size, specifically include:
For each transversal stretching region of selection, by 1 pixel of lateral dimension boil down in the transversal stretching region.
4. a kind of method of nine figure of compression point, the longitudinal size for nine figure of compression point, which comprises
Determine each compressible longitudinal extension region in nine figure of point;
From the compressible each longitudinal extension region determined, at least one longitudinal extension region is selected;
For the stretching region longitudinally in each of selection, the longitudinal size in the longitudinal extension region is compressed, and adjusts the longitudinal extension The size of the corresponding longitudinal extension marking line in region so that the longitudinal extension marking line adjusted it is signable go out it is compressed should Longitudinal extension region;
Wherein it is determined that each compressible longitudinal extension region in nine figure of point, comprising:
For the marking line that stretches longitudinally in each of nine figure of point, determines and correspond to the longitudinal extension marking line in nine figure of point Longitudinal extension region;
Judge whether the longitudinal extension region meets the second specified requirements;Second specified requirements is, in the longitudinal extension area In domain, the color of each pixel in same row is identical;
If so, determining that the longitudinal extension region is compressible.
5. method as claimed in claim 4 selects at least one vertical from the compressible each longitudinal extension region determined To stretching region, specifically include:
Select all compressible longitudinal compression regions.
6. method as claimed in claim 4 compresses the vertical of the longitudinal extension region for the stretching region longitudinally in each of selection To size, specifically include:
For the stretching region longitudinally in each of selection, by 1 pixel of longitudinal size boil down in the longitudinal extension region.
7. a kind of device of nine figure of compression point, for the lateral dimension of nine figure of compression point, described device includes:
Determining module determines each compressible transversal stretching region in nine figure of point;
Selecting module selects at least one transversal stretching region from each compressible transversal stretching region determined;
Compression module compresses the lateral dimension in the transversal stretching region for each transversal stretching region of selection, and adjusting should The size of the corresponding transversal stretching marking line in transversal stretching region goes out to press so that the transversal stretching marking line adjusted is signable The transversal stretching region after contracting;
Wherein, the determining module includes:
It determines submodule, for each transversal stretching marking line of nine figure of point, determines and correspond to the cross in nine figure of point To the transversal stretching region of flexible marking line;
Judgement processing submodule, judges whether the transversal stretching region meets the first specified requirements, and first specified requirements is, It is identical with the color of each pixel in a line in the transversal stretching region;If so, determining that the transversal stretching region can Compression.
8. device as claimed in claim 7, the selecting module select all compressible transverse compressed grooves.
9. device as claimed in claim 7, the compression module, for each transversal stretching region of selection, by the transverse direction 1 pixel of lateral dimension boil down to of stretching region.
10. a kind of device of nine figure of compression point, for the longitudinal size of nine figure of compression point, described device includes:
Determining module determines each compressible longitudinal extension region in nine figure of point;
Selecting module selects at least one longitudinal extension region from the compressible each longitudinal extension region determined;
Compression module compresses the longitudinal size in the longitudinal extension region for the stretching region longitudinally in each of selection, and adjusting should The size of the corresponding longitudinal extension marking line in longitudinal extension region goes out to press so that the longitudinal extension marking line adjusted is signable The longitudinal extension region after contracting;
Wherein, the determining module includes:
It determines submodule, for the marking line that stretches longitudinally in each of nine figure of point, determines vertical corresponding to this in nine figure of point To the longitudinal extension region of flexible marking line;
Judgement processing submodule, judges whether the longitudinal extension region meets the second specified requirements, and second specified requirements is, In the longitudinal extension region, the color of each pixel in same row is identical;If so, determining that the longitudinal extension region can Compression.
11. device as claimed in claim 10, the selecting module select all compressible longitudinal compression regions.
12. device as claimed in claim 10, the compression module indulges this for the stretching region longitudinally in each of selection To 1 pixel of longitudinal size boil down to of stretching region.
13. a kind of computer equipment including memory, processor and stores the meter that can be run on a memory and on a processor Calculation machine program, wherein the computer equipment is equipped with standard focal length camera lens and long focal length lens, and the processor executes the journey Such as method as claimed in any one of claims 1 to 6 is realized when sequence.
CN201910572280.6A 2019-06-28 2019-06-28 Method and device for compressing point nine graphs Active CN110349227B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910572280.6A CN110349227B (en) 2019-06-28 2019-06-28 Method and device for compressing point nine graphs

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910572280.6A CN110349227B (en) 2019-06-28 2019-06-28 Method and device for compressing point nine graphs

Publications (2)

Publication Number Publication Date
CN110349227A true CN110349227A (en) 2019-10-18
CN110349227B CN110349227B (en) 2023-01-20

Family

ID=68176876

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910572280.6A Active CN110349227B (en) 2019-06-28 2019-06-28 Method and device for compressing point nine graphs

Country Status (1)

Country Link
CN (1) CN110349227B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102497489A (en) * 2011-12-05 2012-06-13 优视科技有限公司 Image compression method, image compression device and mobile terminal
AU2013201684A1 (en) * 2007-02-20 2013-04-11 Med-El Elektromedizinische Geraete Gmbh Implant sensor and control
CN108228050A (en) * 2017-12-13 2018-06-29 阿里巴巴集团控股有限公司 A kind of picture Zoom method, device and electronic equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2011213753B2 (en) * 2007-02-20 2012-12-20 Med-El Elektromedizinische Geraete Gmbh Implant sensor and control

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2013201684A1 (en) * 2007-02-20 2013-04-11 Med-El Elektromedizinische Geraete Gmbh Implant sensor and control
CN102497489A (en) * 2011-12-05 2012-06-13 优视科技有限公司 Image compression method, image compression device and mobile terminal
CN108228050A (en) * 2017-12-13 2018-06-29 阿里巴巴集团控股有限公司 A kind of picture Zoom method, device and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王平: "图像文件压缩算法浅析", 《消费导刊》 *

Also Published As

Publication number Publication date
CN110349227B (en) 2023-01-20

Similar Documents

Publication Publication Date Title
US11704837B2 (en) Point cloud encoding method, point cloud decoding method, encoder, and decoder
US10108323B2 (en) Method and device for drawing a graphical user interface
US10269160B2 (en) Method and apparatus for processing image
US8194070B2 (en) System and method of converting edge record based graphics to polygon based graphics
US20120032783A1 (en) Electronic reader system with external display interface and method of operation thereof
US11893767B2 (en) Text recognition method and apparatus
CN111768416B (en) Photo cropping method and device
CN110163786B (en) Method, device and equipment for removing watermark
CN108399074A (en) A kind of update method of application program, terminal and computer readable storage medium
CN106446223B (en) Map data processing method and device
CN111068316B (en) Game frame number adjusting method, device, storage medium and electronic equipment
CN106599758A (en) Image quality processing method and terminal
CN115129801A (en) Map data processing method, device, equipment and storage medium
JP2024505844A (en) Screen content processing methods, devices and equipment
US20240112299A1 (en) Video cropping method and apparatus, storage medium and electronic device
CN108989704B (en) Image generation method and device and terminal equipment
CN116680023A (en) Self-adaptive display method of interface and terminal equipment
CN110349227A (en) A kind of method and device of nine figure of compression point
CN116128710A (en) Image resolution adjustment method, device, equipment and storage medium
CN102831624A (en) Method and device for compressing image
CN109388726A (en) A kind of image display method, device, equipment and computer-readable medium
CN105678688A (en) Picture processing method and device
CN116343247B (en) Form image correction method, device and equipment
CN105279727A (en) Image processing method and apparatus
CN116132572B (en) Interface display method and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Innovative advanced technology Co.,Ltd.

Address before: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant before: Advanced innovation technology Co.,Ltd.

Effective date of registration: 20200925

Address after: Cayman Enterprise Centre, 27 Hospital Road, George Town, Grand Cayman Islands

Applicant after: Advanced innovation technology Co.,Ltd.

Address before: A four-storey 847 mailbox in Grand Cayman Capital Building, British Cayman Islands

Applicant before: Alibaba Group Holding Ltd.

GR01 Patent grant
GR01 Patent grant