CN109933262B - GIF screen capturing method and device - Google Patents
GIF screen capturing method and device Download PDFInfo
- Publication number
- CN109933262B CN109933262B CN201910176678.8A CN201910176678A CN109933262B CN 109933262 B CN109933262 B CN 109933262B CN 201910176678 A CN201910176678 A CN 201910176678A CN 109933262 B CN109933262 B CN 109933262B
- Authority
- CN
- China
- Prior art keywords
- image
- gif
- original image
- unit
- drawing layer
- 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.)
- Active
Links
Images
Landscapes
- Processing Or Creating Images (AREA)
Abstract
A GIF screen capture method and a device thereof belong to the field of data image processing; the problems that professional software, professional operation and time consumption are needed for editing the GIF image in the prior art are solved; acquiring a GIF image from a GIF image file group as a GIF original image, and reading the attribute of the original image; determining the coordinate of the cutting area, and converting the coordinate of the cutting area into a relative coordinate taking the original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file; acquiring a drawing layer, splitting the cut image to obtain multiple frames of pictures, and merging the drawing layer with each frame of picture in the cut image to obtain a merged image file; reading and displaying the combined image file frame by frame according to the original image attribute to generate a GIF new image file; the method does not need professional software and professional operation, saves time, and enables a user to quickly, efficiently and inexpensively perform screen capture processing on the GIF image.
Description
Technical Field
The invention belongs to the field of data image processing, and particularly relates to a GIF screen capturing method and device.
Background
The GIF Format is an image Interchange Format (GIF), which is an image file Format developed by the company compuseserver in 1987. The GIF format can store a plurality of color images, and a simple animation is constructed by reading a plurality of image data stored in a folder one by one and displaying the image data on a screen.
In recent years, with the rapid development of social software, emoticons have become a popular culture. With the popularity of emotion packet culture, picture expressions and GIF images are highly appreciated by people, particularly young people. At present, the method and the device for picture screen capturing are mature, and the screen capturing and the visual drawing of the picture can be completed without professional picture editing software. However, the screen capture of the GIF image requires the use of professional image editing software, and for ordinary people, the screen capture and the visual drawing of the GIF image can be completed only by learning the image editing related knowledge and consuming a certain time.
Disclosure of Invention
The invention overcomes the defects of the prior art and provides a GIF screen capturing method and a device thereof, wherein a clipped image file is obtained by converting the coordinates of a clipping area into relative coordinates taking an original image as a reference; splitting the cut image to obtain multiple frames of pictures, and combining the drawing layer with each frame of picture in the cut image to obtain a combined image file; reading and displaying the combined image file frame by frame according to the original image attribute to generate a GIF new image file; the problem that professional software, professional operation and time consumption are needed for editing the GIF image in the prior art is effectively solved, and therefore the aims of quick, efficient and low-cost screen capture of the GIF image are achieved.
The technical scheme of the invention is as follows:
a GIF screen capture method comprises the following steps:
step a, acquiring a GIF image from the GIF image file group as a GIF original image, and reading the attribute of the original image;
b, determining the coordinate of the cutting area, and converting the coordinate of the cutting area into a relative coordinate taking the original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file;
step c, obtaining a drawing layer, splitting the cut image to obtain multiple frames of pictures, and combining the drawing layer with each frame of picture in the cut image to obtain a combined image file;
and d, reading and displaying the combined image file frame by frame according to the attribute of the original image to generate a GIF new image file.
Specifically, the manner of determining the coordinates of the clipping region is as follows: and responding to the cutting instruction, acquiring the range of the cutting area, and reading the absolute coordinate value in the cutting area.
Specifically, the step of cutting the original image by using the relative coordinates of the original image as a reference means converting the absolute coordinate values into relative coordinate values using the original image as a reference system, and simultaneously cutting each frame of the picture in the original image according to the relative coordinates.
Specifically, the manner of obtaining the drawing layer is as follows: in response to the drawing instruction, a drawing layer is created and obtained, and elements in the drawing layer comprise graphics, graffiti and text boxes.
Specifically, the merging the drawing layer with each frame of picture in the cropped image to obtain a merged image file includes: the method comprises the steps that a plurality of images are stored in a GIF original image, and the original image is split to obtain a plurality of frames of images serving as processing units; and merging the drawing layer and each frame of picture in the cut image to obtain a merged image file.
A GIF screen capture device comprises a selection unit, a screen capture unit, a merging unit and a generation unit;
a selecting unit acquires a GIF image from the GIF image file group as a GIF original image, and reads the attribute of the original image;
the method comprises the steps of screenshot unit, determining coordinates of a cutting area, and converting the coordinates of the area into relative coordinates taking an original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file;
the merging unit is used for acquiring a drawing layer, splitting the cut image to obtain a plurality of frames of pictures, merging the drawing layer and each frame of picture in the plurality of frames of pictures to obtain a merged image file;
and the generating unit reads and displays the combined image file frame by frame according to the original image attribute to generate a GIF new image file.
Specifically, the screenshot unit comprises a clipping area determining unit and a clipping unit;
determining a cutting area unit, responding to a cutting instruction, acquiring a cutting area range, and reading an absolute coordinate value in the cutting area;
and the cutting unit is used for converting the absolute coordinates into relative coordinates taking the original image as reference, and cutting the original image according to the relative coordinates to obtain a cut image file.
Specifically, the merging unit includes a drawing layer obtaining unit and a merging processing unit;
the drawing layer acquiring unit is used for responding to a drawing instruction, creating and acquiring a drawing layer, wherein elements in the drawing layer comprise a graph, a doodle and a text box;
and the merging processing unit is used for splitting the cut image to obtain a plurality of frames of pictures, and merging the drawing layer with each frame of picture in the cut image to obtain a merged image file.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a GIF screen capturing method and a device thereof, wherein a clipped image file is obtained by converting the coordinates of a clipping area into relative coordinates taking an original image as a reference; splitting the cut image to obtain multiple frames of pictures, and combining the drawing layer with each frame of picture in the cut image to obtain a combined image file; reading and displaying the combined image file frame by frame according to the original image attribute to generate a GIF new image file; the problem that professional software and professional operation are needed and time is consumed for editing the GIF image in the prior art is effectively solved, so that the aims of quickly, efficiently and low-cost screen capture of the GIF image are fulfilled, professional software and professional operation are not needed, time is saved, and a user can quickly, efficiently and low-cost screen capture of the GIF image.
Drawings
FIG. 1 is a flowchart of a GIF screen capture method of the present invention;
FIG. 2 is a cross-sectional flow diagram of the present invention;
FIG. 3 is a merged flow chart of the present invention;
FIG. 4 is a block diagram of the GIF screen capture apparatus according to the present invention.
Detailed Description
The present invention will be described in detail below with reference to the accompanying drawings.
Detailed description of the invention
A GIF screen capture method, as shown in fig. 1, comprising the steps of:
step a, acquiring a GIF image from the GIF image file group as a GIF original image, and reading the attribute of the original image; the attributes include: size, frame number, delay of each frame and cycle number;
b, determining the coordinate of the cutting area, and converting the coordinate of the cutting area into a relative coordinate taking the original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file;
in the original GIF image, not all the contents are required by the user, and the user can select by cropping the area, the image within the area is reserved as required, and the unnecessary removed portion outside the area.
Step c, obtaining a drawing layer, splitting the cut image to obtain multiple frames of pictures, and combining the drawing layer with each frame of picture in the cut image to obtain a combined image file;
elements in the drawing layer include graphics, graffiti, and text boxes. For example, any element generates a drawing layer, i.e., a graphic, a scribble, or a text box generates a drawing layer. The drawing layer can be one drawing layer or a plurality of drawing layers. The sequence of the plurality of drawing layers may be arranged at will, for example, the sequence of the drawing layers is graphics, graffiti, and characters, and the effect of the sequence is the same as the sequence of the graphics, graffiti, and the graphics, which may be determined by a user according to the actual application requirements, and this is not specifically limited in the embodiment of the present invention.
After obtaining the drawing layer and the multi-frame split pictures of the cut image, merging each frame of picture in the cut image to obtain a merged image file. It should be noted that the merged image file carries both the content of the GIF clipped image and the content of the added drawing layer.
And d, reading and displaying the combined image file frame by frame according to the attribute of the original image to generate a GIF new image file.
Reading the attribute of the original image: delay per frame and cycle count. Reading out a plurality of frames of the combined images stored in the file frame by frame according to each frame delay and cycle number, displaying the images on a screen, and generating and storing a GIF new image file.
Specifically, the manner of determining the coordinates of the clipping region is as follows: and responding to the cutting instruction, acquiring the range of the cutting area, and reading the absolute coordinate value in the cutting area.
Specifically, the step of cutting the original image by using the relative coordinates of the original image as a reference means converting the absolute coordinate values into relative coordinate values using the original image as a reference system, and simultaneously cutting each frame of the picture in the original image according to the relative coordinates.
Specifically, as shown in fig. 2, the clipping method includes:
and determining the coordinate of the cutting area, and converting the coordinate of the cutting area into relative coordinate taking the original image as reference.
Determining the operation mode of the cutting area, for example, obtaining a cutting instruction through external input content, obtaining the range of the cutting area according to the prompt of the cutting instruction, and reading the absolute coordinate values of four endpoints in the cutting area.
The method for determining the visual operation mode of the cutting area by the user comprises the following steps:
the method comprises the steps that firstly, a mouse is clicked and dragged on a GIF original image, and a selection area frame is randomly dragged to adjust the width and the height of a cutting area;
and in the second mode, the width value and the height value of the cutting area are manually input by referring to the width value and the height value of the GIF original image, the selection area is dragged by a mouse, and the relative position relation between the cutting area and the original image is adjusted.
And cutting the original image according to the relative coordinates.
And after the cutting area is determined, converting the coordinates of the cutting area into relative coordinates by taking the original image as a reference system, and cutting the original image according to the relative coordinates. The GIF image file may store a plurality of frames of color pictures, and it is assumed that the GIF original image stores N frames of pictures, and the size of each frame of picture is the same. And simultaneously cutting N frames of pictures according to the relative coordinates to obtain a cut image file.
Specifically, the manner of obtaining the drawing layer is as follows: in response to the drawing instruction, a drawing layer is created and obtained, and elements in the drawing layer comprise graphics, graffiti and text boxes.
Specifically, the merging the drawing layer with each frame of picture in the cropped image to obtain a merged image file includes: the method comprises the steps that a plurality of images are stored in a GIF original image, and the original image is split to obtain a plurality of frames of images serving as processing units; and merging the drawing layer and each frame of picture in the cut image to obtain a merged image file.
Specifically, as shown in fig. 3, the merging method includes:
and acquiring a drawing layer.
And in response to the drawing instruction, creating a new drawing layer with the same size as the cropped image, and adding drawing elements. The drawing instruction operation comprises the following steps: graphics, graffiti, and text boxes.
The drawing operation mode of the user on the cut image is as follows: graphics, graffiti, and text boxes are visually and intuitively added to the GIF cropped image. By way of example, graphics include rectangles, ellipses, arrows, and lines; the graffiti refers to a random and irregular picture; various characters, letters, symbols and numbers are added in the text box. The color, size, and position of the drawing element are determined according to the requirement of the user, which is not specifically limited in this embodiment.
And splitting the cut image to obtain a plurality of frames of pictures.
The cut image stores N frames of pictures, the GIF cut image is split to obtain N frames of pictures, and the picture of each frame is used as a processing unit.
And merging the drawing layer and each frame of picture in the cut image to obtain a merged image file.
And responding to the drawing combination instruction, acquiring a drawing layer and combining the drawing layer with the first frame of picture in the cut image, and similarly processing each frame of picture in the GIF cut image. And responding to the drawing merging instruction again to obtain a drawing layer, and performing the same processing as the above processing, and so on. Finally, a merged GIF image is obtained.
Detailed description of the invention
A GIF screen capture device is shown in figure 4 and comprises a selection unit, a screen capture unit, a merging unit and a generation unit;
a selecting unit acquires a GIF image from the GIF image file group as a GIF original image, and reads the attribute of the original image;
the method comprises the steps of screenshot unit, determining coordinates of a cutting area, and converting the coordinates of the area into relative coordinates taking an original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file;
the merging unit is used for acquiring a drawing layer, splitting the cut image to obtain a plurality of frames of pictures, merging the drawing layer and each frame of picture in the plurality of frames of pictures to obtain a merged image file;
and the generating unit reads and displays the combined image file frame by frame according to the original image attribute to generate a GIF new image file.
Specifically, the screenshot unit comprises a clipping area determining unit and a clipping unit;
determining a cutting area unit, responding to a cutting instruction, acquiring a cutting area range, and reading an absolute coordinate value in the cutting area;
and the cutting unit is used for converting the absolute coordinates into relative coordinates taking the original image as reference, and cutting the original image according to the relative coordinates to obtain a cut image file.
Specifically, the merging unit includes a drawing layer obtaining unit and a merging processing unit;
the drawing layer acquiring unit is used for responding to a drawing instruction, creating and acquiring a drawing layer, wherein elements in the drawing layer comprise a graph, a doodle and a text box;
and the merging processing unit is used for splitting the cut image to obtain a plurality of frames of pictures, and merging the drawing layer with each frame of picture in the cut image to obtain a merged image file.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for apparatus or system embodiments, since they are substantially similar to method embodiments, they are described in relative terms, as long as they are described in partial descriptions of method embodiments.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.
Claims (5)
1. A GIF screen capture method is characterized by comprising the following steps:
step a, acquiring a GIF image from the GIF image file group as a GIF original image, and reading the attribute of the original image;
b, determining the coordinate of the cutting area, and converting the coordinate of the cutting area into a relative coordinate taking the original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file;
the method for determining the coordinate of the cutting area comprises the following steps: responding to the cutting instruction, obtaining the range of the cutting area, and reading the absolute coordinate value in the cutting area;
the relative coordinate taking the original image as a reference is used for cutting the original image, namely the absolute coordinate value is converted into a relative coordinate value taking the original image as a reference system, and each frame of picture in the original image is simultaneously cut according to the relative coordinate;
step c, obtaining a drawing layer, splitting the cut image to obtain multiple frames of pictures, and combining the drawing layer with each frame of picture in the cut image to obtain a combined image file;
and d, reading and displaying the combined image file frame by frame according to the attribute of the original image to generate a GIF new image file.
2. The GIF screen capture method according to claim 1, wherein the manner of obtaining the drawing layer is as follows: in response to the drawing instruction, a drawing layer is created and obtained, and elements in the drawing layer comprise graphics, graffiti and text boxes.
3. The GIF screen capture method of claim 1, wherein the merging of the drawing layer and each frame of picture in the cropped image to obtain a merged image file comprises: the method comprises the steps that a plurality of images are stored in a GIF original image, and the original image is split to obtain a plurality of frames of images serving as processing units; and merging the drawing layer and each frame of picture in the cut image to obtain a merged image file.
4. A GIF screen capture device is characterized by comprising a selection unit, a screen capture unit, a merging unit and a generation unit;
a selecting unit acquires a GIF image from the GIF image file group as a GIF original image, and reads the attribute of the original image;
the method comprises the steps of screenshot unit, determining coordinates of a cutting area, and converting the coordinates of the area into relative coordinates taking an original image as a reference; according to the relative coordinates, cutting the original image to obtain a cut image file;
the merging unit is used for acquiring a drawing layer, splitting the cut image to obtain a plurality of frames of pictures, merging the drawing layer and each frame of picture in the plurality of frames of pictures to obtain a merged image file;
the generating unit reads and displays the combined image file frame by frame according to the original image attribute to generate a GIF new image file;
the screenshot unit comprises a cutting area determining unit and a cutting unit;
determining a cutting area unit, responding to a cutting instruction, acquiring a cutting area range, and reading an absolute coordinate value in the cutting area;
and the cutting unit is used for converting the absolute coordinates into relative coordinates taking the original image as reference, and cutting the original image according to the relative coordinates to obtain a cut image file.
5. The GIF screen capturing device as claimed in claim 4, wherein said merging unit comprises a drawing layer acquiring unit and a merging processing unit;
the drawing layer acquiring unit is used for responding to a drawing instruction, creating and acquiring a drawing layer, wherein elements in the drawing layer comprise a graph, a doodle and a text box;
and the merging processing unit is used for splitting the cut image to obtain a plurality of frames of pictures, and merging the drawing layer with each frame of picture in the cut image to obtain a merged image file.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910176678.8A CN109933262B (en) | 2019-03-08 | 2019-03-08 | GIF screen capturing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910176678.8A CN109933262B (en) | 2019-03-08 | 2019-03-08 | GIF screen capturing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109933262A CN109933262A (en) | 2019-06-25 |
CN109933262B true CN109933262B (en) | 2020-12-08 |
Family
ID=66986566
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910176678.8A Active CN109933262B (en) | 2019-03-08 | 2019-03-08 | GIF screen capturing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109933262B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111582281B (en) * | 2020-05-11 | 2023-05-16 | 广东小天才科技有限公司 | Picture display optimization method and device, electronic equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104080005A (en) * | 2014-07-10 | 2014-10-01 | 福州瑞芯微电子有限公司 | Device and method for clipping dynamic pictures |
CN105138695A (en) * | 2015-09-21 | 2015-12-09 | 合一网络技术(北京)有限公司 | Method and device for graphics interchange format (GIF) recording |
CN105653036A (en) * | 2015-12-31 | 2016-06-08 | 深圳市路通网络技术有限公司 | Scrawling augmented reality method and system |
CN107229402A (en) * | 2017-05-22 | 2017-10-03 | 努比亚技术有限公司 | Dynamic screenshotss method, device and the readable storage medium storing program for executing of terminal |
CN108804061A (en) * | 2017-05-05 | 2018-11-13 | 上海盟云移软网络科技股份有限公司 | The virtual scene display method of virtual reality system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR101255205B1 (en) * | 2006-06-19 | 2013-04-23 | 삼성전자주식회사 | Methog for generating animation GIF file of digital photographing device |
-
2019
- 2019-03-08 CN CN201910176678.8A patent/CN109933262B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104080005A (en) * | 2014-07-10 | 2014-10-01 | 福州瑞芯微电子有限公司 | Device and method for clipping dynamic pictures |
CN105138695A (en) * | 2015-09-21 | 2015-12-09 | 合一网络技术(北京)有限公司 | Method and device for graphics interchange format (GIF) recording |
CN105653036A (en) * | 2015-12-31 | 2016-06-08 | 深圳市路通网络技术有限公司 | Scrawling augmented reality method and system |
CN108804061A (en) * | 2017-05-05 | 2018-11-13 | 上海盟云移软网络科技股份有限公司 | The virtual scene display method of virtual reality system |
CN107229402A (en) * | 2017-05-22 | 2017-10-03 | 努比亚技术有限公司 | Dynamic screenshotss method, device and the readable storage medium storing program for executing of terminal |
Also Published As
Publication number | Publication date |
---|---|
CN109933262A (en) | 2019-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6549806B1 (en) | Segment the content displayed on the computing device into regions based on the pixel of the screenshot image that captures the content | |
US20230252710A1 (en) | Information processing apparatus, information processing method, and program | |
US10140675B2 (en) | Image grid with selectively prominent images | |
EP3279866B1 (en) | Method and apparatus for generating synthetic picture | |
CN107005458B (en) | Unscripted digital media message generation method, device, electronic equipment and readable medium | |
US8952989B2 (en) | Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium | |
JP2011141677A (en) | Apparatus and method for digitizing documents | |
CN113302659A (en) | System and method for generating personalized video with customized text messages | |
CN104834645B (en) | Method and apparatus for showing format document | |
WO2022242397A1 (en) | Image processing method and apparatus, and computer-readable storage medium | |
CN109388725A (en) | The method and device scanned for by video content | |
CN115988170B (en) | Method and device for clearly displaying English characters in real-time video combined screen in cloud conference | |
JP5526874B2 (en) | Image processing apparatus and image processing program | |
CN109933262B (en) | GIF screen capturing method and device | |
US10120539B2 (en) | Method and device for setting user interface | |
KR20190138798A (en) | Live Ink Presence for Real-Time Collaboration | |
US20190361986A9 (en) | Method for displaying dynamic media with text bubble emulation | |
CN107665186B (en) | A kind of peculiar font generation method | |
CN102999512A (en) | Method and system for processing text advertisement | |
CN102487362A (en) | Instant messaging (IM) message display method and device | |
JP2011192008A (en) | Image processing system and image processing method | |
KR100938992B1 (en) | Structure of animation font file and method for displaying text data of handheld terminal | |
US20220269396A1 (en) | Dynamic targeting of preferred objects in video stream of smartphone camera | |
CN111399788B (en) | Media file playing method and media file playing device | |
US20130104014A1 (en) | Viewer unit, server unit, display control method, digital comic editing method and non-transitory computer-readable medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |