# US 2018/0324459 A1 · Method and device for compressing image, and electronic device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2018/0324459 A1
- Document ID: US20180324459A1
- Status: Published application
- Kind: A1
- Application number: 16/037,704
- Filed: 2018-07-17
- Published: 2018-11-08
- Earliest claimed: 2016-05-27
- Assignees: Beijing Kingsoft Internet Security Software Co., Ltd.
- Applicants: Beijing Kingsoft Internet Security Software Co., Ltd.
- Inventors: Bin Bai
- Web page: https://patentgrep.com/patent/US20180324459A1

## CPC

- H04N 19/59: involving spatial sub-sampling or interpolation, e.g. alteration of picture size or resolution
- G06F 3/14: Digital output to display device {; Cooperation and interconnection of the display device with other functional units}
- G06F 16/1727: {Details of free space management performed by the file system (saving storage space on storage systems G06F3/0608; management of blocks in storage devices G06F3/064)}
- G09G 5/373: for modifying the size of the graphic pattern
- H04N 19/132: Sampling, masking or truncation of coding units, e.g. adaptive resampling, frame skipping, frame interpolation or high-frequency transform coefficient masking
- H04N 19/164: Feedback from the receiver or from the transmission channel
- H04N 19/177: the unit being a group of pictures [GOP]
- H04N 19/182: the unit being a pixel
- G09G 2340/02: Handling of images in compressed format, e.g. JPEG, MPEG
- G09G 2340/0407: Resolution change, inclusive of the use of different resolutions for different screen areas
- H04N: PICTORIAL COMMUNICATION, e.g. TELEVISION
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G09G: ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION (arrangements for transferring data between digital computers and displays G06F3/14; static indicating arrangements comprising an association of a number of separate sources or light control cells G09F9/00; static indicating arrangements comprising integral associations of a number of light sources H01J, H01K, H10H, H05B33/12; scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission, details thereof H04N1/00)

## Abstract

The present disclosure provides a method and a device for compressing an image, and an electronic device. The method includes: acquiring a resolution of the display screen and a resolution of an image to be compressed; detecting whether the resolution of the image to be compressed is greater than the resolution of the display screen; and when the resolution of the image to be compressed is greater than the resolution of the display screen, compressing the resolution of the image to be compressed to a target resolution according to the resolution of the display screen, a difference between the target resolution and the resolution of the display screen being within a preset resolution range.

## Claims

### Claim 1

A method for compressing an image, applicable in an electronic device with a display screen, comprising:
acquiring a resolution of the display screen and a resolution of an image to be compressed;
detecting whether the resolution of the image to be compressed is greater than the resolution of the display screen; and
when the resolution of the image to be compressed is greater than the resolution of the display screen, compressing the resolution of the image to be compressed to a target resolution according to the resolution of the display screen, a difference between the target resolution and the resolution of the display screen being within a preset resolution range.

### Claim 2 (depends on 1)

The method according to claim 1, wherein, compressing the resolution of the image to be compressed to the target resolution according to the resolution of the display screen, the difference between the target resolution and the resolution of the display screen being within the preset resolution range, comprises:
compressing the image to be compressed by using the resolution of the display screen as the target resolution.

### Claim 3 (depends on 1)

The method according to claim 1, wherein, after compressing the image to be compressed by using the resolution of the display screen as the target resolution, the method further comprises:
storing the compressed image; and
deleting the image to be compressed.

### Claim 4 (depends on 1)

The method according to claim 1, wherein, before acquiring the resolution of the display screen and the resolution of the image to be compressed, the method further comprises:
acquiring a remaining storage space of the electronic device; and
detecting whether the remaining storage space is less than a preset storage space threshold,
wherein acquiring the resolution of the display screen and the resolution of the image to be compressed comprises:
acquiring the resolution of the display screen and the resolution of the image to be compressed when the remaining storage space is less than the preset storage space threshold.

### Claim 5 (depends on 1)

The method according to claim 1, wherein the method further comprises:
acquiring a type of an image compressed by the electronic device in a preset time period;
detecting whether there is an uncompressed image matching with the type in images stored in the electronic device; and
selecting the uncompressed image matching with the type as the image to be compressed when there is the uncompressed image matching with the type in the images stored in the electronic device.

### Claim 6

A device for compressing an image, disposed on an electronic device configured with a display screen, comprising:
a processor, and
a memory, configured to store a computer program comprising program instructions,
wherein the processor is configured to:
acquire a resolution of the display screen and a resolution of an image to be compressed;
detect whether the resolution of the image to be compressed is greater than the resolution of the display screen; and
compress the resolution of the image to be compressed to a target resolution according to the resolution of the display screen when the resolution of the image to be compressed is greater than the resolution of the display screen, a difference between the target resolution and the resolution of the display screen being within a preset resolution range.

### Claim 7 (depends on 6)

The device according to claim 6, wherein the processor is configured to compress the resolution of the image to be compressed to the target resolution according to the resolution of the display screen by acts of:
compressing the image to be compressed by using the resolution of the display screen as the target resolution.

### Claim 8 (depends on 6)

The device according to claim 6, wherein the processor is further configured to:
store the compressed image after the processor compresses the image to be compressed by using the resolution of the display screen as the target resolution; and
delete the image to be compressed.

### Claim 9 (depends on 6)

The device according to claim 6, wherein the processor is further configured to:
acquire a remaining storage space of the electronic device before the processor acquires the resolution of the display screen and the resolution of the image to be compressed; and
detect whether the remaining storage space is less than a preset storage space threshold,
wherein the processor is configured to acquire the resolution of the display screen and the resolution of the image to be compressed by acts of:
acquiring the resolution of the display screen and the resolution of the image to be compressed when the remaining storage space is less than the preset storage space threshold.

### Claim 10 (depends on 6)

The device according to claim 6, wherein processor is further configured to:
acquire a type of an image compressed by the electronic device in a preset time period;
detect whether there is an uncompressed image matching with the type in images stored in the electronic device; and
select the uncompressed image matching with the type as the image to be compressed when there is the uncompressed image matching with the type in the images stored in the electronic device.

### Claim 11

An electronic device, comprising a housing, a processor, a memory, a display screen, a circuit board and a power supply circuit, wherein,
the circuit board is disposed in a space enclosed by the housing;
the processor and the memory are positioned on the circuit board;
the display screen is externally embedded on the housing and connected with the circuit board;
the power supply circuit is configured to provide power for respective circuits or components of the electronic device;
the memory is configured to store executable program codes and data; and
the processor is configured to run a program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform following operations:
acquiring a resolution of the display screen and a resolution of an image to be compressed;
detecting whether the resolution of the image to be compressed is greater than the resolution of the display screen; and
when the resolution of the image to be compressed is greater than the resolution of the display screen, compressing the resolution of the image to be compressed to a target resolution according to the resolution of the display screen, a difference between the target resolution and the resolution of the display screen being within a preset resolution range.

### Claim 12 (depends on 11)

The electronic device according to claim 11, wherein the processor is configured to run the program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform the operation of compressing the resolution of the image to be compressed to the target resolution according to the resolution of the display screen, the difference between the target resolution and the resolution of the display screen being within the preset resolution range by acts of:
compressing the image to be compressed by using the resolution of the display screen as the target resolution.

### Claim 13 (depends on 11)

The electronic device according to claim 11, wherein after the processor is configured to run the program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform the operation of compressing the image to be compressed by using the resolution of the display screen as the target resolution, the processor further performs an operation of:
storing the compressed image, and deleting the image to be compressed.

### Claim 14 (depends on 11)

The electronic device according to claim 11, wherein before the processor is configured to run the program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform the operation of acquiring the resolution of the display screen and the resolution of the image to be compressed, the processor further performs operations of:
acquiring a remaining storage space of the electronic device; and
detecting whether the remaining storage space is less than a preset storage space threshold;
wherein acquiring the resolution of the display screen and the resolution of the image to be compressed comprises:
acquiring the resolution of the display screen and the resolution of the image to be compressed when it is detected that the remaining storage space is less than a preset storage space threshold.

### Claim 15 (depends on 11)

The electronic device according to claim 11, wherein the processor is configured to run the program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform operations of:
acquiring a type of an image compressed by the electronic device in a preset time period;
detecting whether there is an uncompressed image matching with the type in images stored in the electronic device; and
selecting the uncompressed image matching with the type as the image to be compressed when there is the uncompressed image matching with the type in the images stored in the electronic device.

### Claim 16 (depends on 1)

The method according to claim 1, wherein compressing the resolution of the image to be compressed to the target resolution according to the resolution of the display screen comprises:
detecting a touch operation input by a user on a touch screen of the electronic device;
detecting whether a touch parameter of the touch operation is matched with a preset parameter for triggering the electronic device to compress the image to be compressed; and
compressing the resolution of the image to be compressed to the target resolution according to the resolution of the display screen when the touch parameter of the touch operation is matched with the preset parameter for triggering the electronic device to compress the image to be compressed.

### Claim 17 (depends on 16)

The method according to claim 16, wherein the touch operation comprises one or more of a slide operation, a click operation, and a press operation;
the touch parameter of the touch operation comprises a touch track, a touch direction, a touch force, a touch frequency, and a time interval between every two touch operations;

### Claim 18 (depends on 6)

The device according to claim 6, wherein the processor is configured to compress the resolution of the image to be compressed to the target resolution according to the resolution of the display screen by acts of:
detect a touch operation input by a user on a touch screen of the electronic device;
detect whether a touch parameter of the touch operation is matched with a preset parameter for triggering the electronic device to compress the image to be compressed; and
compress the resolution of the image to be compressed to the target resolution according to the resolution of the display screen when the touch parameter of the touch operation is matched with the preset parameter for triggering the electronic device to compress the image to be compressed.

### Claim 19 (depends on 18)

The device according to claim 18, wherein the touch operation comprises one or more of a slide operation, a click operation, and a press operation;
the touch parameter of the touch operation comprises a touch track, a touch direction, a touch force, a touch frequency, and a time interval between every two touch operations;

### Claim 20 (depends on 11)

The electronic device according to claim 11, wherein the processor is configured to run the program corresponding to the executable program codes by reading the executable program codes stored in the memory, to perform the operation of compressing the resolution of the image to be compressed to the target resolution according to the resolution of the display screen by acts of:
detecting a touch operation input by a user on a touch screen of the electronic device;
detecting whether a touch parameter of the touch operation is matched with a preset parameter for triggering the electronic device to compress the image to be compressed; and
compressing the resolution of the image to be compressed to the target resolution according to the resolution of the display screen when the touch parameter of the touch operation is matched with the preset parameter for triggering the electronic device to compress the image to be compressed.
