CN112672035B - Thumbnail generation method and terminal - Google Patents

Thumbnail generation method and terminal Download PDF

Info

Publication number
CN112672035B
CN112672035B CN201910984834.3A CN201910984834A CN112672035B CN 112672035 B CN112672035 B CN 112672035B CN 201910984834 A CN201910984834 A CN 201910984834A CN 112672035 B CN112672035 B CN 112672035B
Authority
CN
China
Prior art keywords
data
thumbnail
photographing data
photographing
terminal
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
Application number
CN201910984834.3A
Other languages
Chinese (zh)
Other versions
CN112672035A (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.)
Hisense Mobile Communications Technology Co Ltd
Original Assignee
Hisense Mobile Communications Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Mobile Communications Technology Co Ltd filed Critical Hisense Mobile Communications Technology Co Ltd
Priority to CN201910984834.3A priority Critical patent/CN112672035B/en
Publication of CN112672035A publication Critical patent/CN112672035A/en
Application granted granted Critical
Publication of CN112672035B publication Critical patent/CN112672035B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The application discloses a thumbnail generation method and a terminal, relates to the technical field of image processing, and aims to solve the problem that time required for generating a thumbnail is long in the prior art. The method comprises the following steps: responding to a photographing instruction to obtain photographing data in a hardware abstraction layer; transcoding the acquired photographing data through a pre-added callback channel, and calling back the transcoded photographing data to a system application layer through the callback channel; and generating a thumbnail in the system application layer according to the transcoded photographing data. The shooting data acquired at the hardware abstraction layer is called back to a system application layer through a pre-added call-back channel without being transmitted through the existing channel; and the photographing data is transcoded in the callback channel, so that the time for generating the thumbnail can be greatly reduced, and the user experience is improved.

Description

Thumbnail generation method and terminal
Technical Field
The present application relates to the field of image processing technologies, and in particular, to a thumbnail generation method and a terminal.
Background
In the field of cameras, photographing performance is an index of great interest to users, and thumbnail generation is very important photographing performance.
In the prior art, a thumbnail is generated by acquiring an actual photo, processing the actual photo to obtain bitmap (bitmap file format) data required by the thumbnail, and generating the thumbnail according to the bitmap data. The thumbnail generated by this method is obtained from the actual photograph, so that the time required to generate the thumbnail is long.
Disclosure of Invention
The embodiment of the application provides a thumbnail generation method and a terminal, which are used for solving the problem that the time required for generating a thumbnail is long in the prior art.
In a first aspect, an embodiment of the present application provides a thumbnail generation method, where the method includes:
responding to a photographing instruction to obtain photographing data in a hardware abstraction layer;
transcoding the acquired photographing data through a pre-added callback channel, and calling back the transcoded photographing data to a system application layer through the callback channel;
and generating a thumbnail in the system application layer according to the transcoded photographing data.
According to the method, the shooting data acquired by the hardware abstraction layer is called back to the system application layer through the pre-added call-back channel without being transmitted through the existing channel; and the photographing data is transcoded in the callback channel, so that the time for generating the thumbnail can be greatly reduced, and the user experience is improved.
In a possible implementation manner, the transcoding the obtained photographing data through a callback channel added in advance, and calling back the transcoded photographing data to a system application layer through the callback channel includes:
calling back the acquired photographing data to a C language library layer through the call-back channel;
converting the photographing data into photographing data in a bitmap file format according to a native development kit NDK;
calling back the photographing data in the bitmap file format to a system application layer through the call-back channel;
the generating a thumbnail according to the transcoded photographing data in the system application layer comprises:
and generating a thumbnail in the system application layer according to the photographing data in the bitmap file format.
According to the method, the NDK is limited to be used for transcoding the photographing data in the C language library layer, so that the transcoding speed can be improved, the obtained photographing data in the bitmap file format is faster, and the time for generating the thumbnail is further shortened.
In a possible implementation manner, before the transcoding the obtained photographing data through the pre-added callback channel and calling back the transcoded photographing data to the system application layer through the callback channel, the method further includes:
it is determined that the flash is in an on state.
According to the method, when the flash lamp is in the open state, the transcoded photographing data are obtained through the callback channel, and the thumbnail is generated, so that the generated thumbnail is consistent with the actual photo, and the watching experience of a user is improved.
In one possible implementation, the method further includes:
and if the flash lamp is in a closed state, acquiring preview frame data, and obtaining a thumbnail according to the preview frame data.
According to the method, the thumbnail is generated through the preview frame data when the flash lamp is in the closed state, so that the thumbnail can be generated more quickly through the preview frame data generation thumbnail when no external environment interference exists or the external environment interference is small.
In a possible implementation manner, the acquiring preview frame data includes:
and acquiring preview frame data through a video display control textview.
According to the method, the preview frame data are limited to be acquired through the video display control textview, so that the preview frame data can be acquired more quickly, and the time for generating the thumbnail is further reduced.
In a second aspect, a terminal for generating a thumbnail provided in an embodiment of the present application includes: a processor and a camera;
the camera is characterized in that: for acquiring an image;
the processor: the camera is used for responding to a photographing instruction to acquire photographing data of the camera at a hardware abstraction layer; the acquired photographing data is transcoded through a pre-added callback channel, and the transcoded photographing data is recalled to a system application layer through the callback channel; and generating a thumbnail in the system application layer according to the transcoded photographing data.
In one possible implementation, the processor is specifically configured to:
the acquired photographing data of the camera is called back to a C language library layer through the call-back channel in the hardware abstraction layer;
converting the photographing data into photographing data in a bitmap file format according to a native development kit NDK;
calling back the photographing data in the bitmap file format to a system application layer through the call-back channel;
and generating a thumbnail in the system application layer according to the photographing data in the bitmap file format.
In a possible implementation manner, the terminal further includes a flash, and the processor is specifically configured to:
and after the flash lamp is determined to be in the on state, transcoding the photographing data of the hardware abstraction layer through a pre-added callback channel.
In one possible implementation, the processor is specifically configured to:
and if the flash lamp is in a closed state, acquiring preview frame data, and obtaining a thumbnail according to the preview frame data.
In one possible implementation, the processor is specifically configured to:
and acquiring preview frame data through a video display control textview.
In a third aspect, an embodiment of the present application further provides a terminal for generating a thumbnail, where the terminal includes a response module, a callback module, and a first generation module:
the response module is used for responding to the photographing instruction to obtain photographing data in the hardware abstraction layer;
the callback module is used for transcoding the acquired photographing data through a callback channel added in advance and calling back the transcoded photographing data to a system application layer through the callback channel;
and the first generation module is used for generating a thumbnail in the system application layer according to the transcoded photographing data.
In one possible implementation, the callback module includes:
the first callback unit is used for calling back the acquired photographing data to a C language library layer through the callback channel;
the transcoding unit is used for converting the photographing data into the photographing data in a bitmap file format according to a native development kit NDK;
the second callback unit is used for calling back the photographing data in the bitmap file format to a system application layer through the callback channel;
the first generation module is specifically configured to generate a thumbnail in the system application layer according to the photographing data in the bitmap file format.
In a possible implementation manner, the terminal further includes:
and the determining module is used for transcoding the acquired photographing data through a pre-added callback channel by the callback module, and determining that the flash lamp is in an open state before the transcoded photographing data is recalled to the system application layer through the callback channel.
In a possible implementation manner, the terminal further includes:
and the second generation module is used for acquiring preview frame data if the flash lamp is in a closed state, and obtaining a thumbnail according to the preview frame data.
In a possible implementation manner, the second generation module is specifically configured to obtain the preview frame data through the video presentation control textview.
In a fourth aspect, the present application also provides a computer storage medium having a computer program stored thereon, which when executed by a processor, performs the steps of the method of the first aspect.
In addition, for technical effects brought by any one implementation manner of the second aspect to the third aspect, reference may be made to technical effects brought by different implementation manners of the first aspect, and details are not described here.
Additional features and advantages of the application will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the application. The objectives and other advantages of the application may be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic diagram of a thumbnail in an embodiment of the present application;
fig. 2 is a schematic diagram of an android system framework in an embodiment of the present application;
fig. 3 is a schematic flowchart of a method for generating a thumbnail in an embodiment of the present application;
FIG. 4 is a flowchart of a complete method for thumbnail generation in an embodiment of the present application;
fig. 5 is a schematic diagram of a terminal for generating a first thumbnail in an embodiment of the present application;
fig. 6 is a schematic diagram of a terminal for generating a second type of thumbnail in the embodiment of the present application;
fig. 7 is a schematic diagram of a terminal for generating a third thumbnail in the embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Some of the words that appear in the text are explained below:
1. in the embodiment of the present application, the term "and/or" describes an association relationship of associated objects, and means that there may be three relationships, for example, a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
2. The term "terminal" in the embodiments of the present application refers to a computer device that can be used in mobile, i.e., a mobile phone, a tablet, and the like.
3. The term "hardware abstraction layer" in the embodiments of the present application is an interface layer between the operating system kernel and the hardware circuitry, which is intended to abstract the hardware. It hides the hardware interface details of specific platform, provides virtual hardware platform for operation system, makes it have hardware independence, and can be transplanted on several platforms. From the perspective of software and hardware testing, the software and hardware testing can be completed based on the hardware abstraction layer, so that the parallel execution of the software and hardware testing becomes possible.
4. The term "thumbnail" in the embodiment of the present application refers to a thumbnail image after a picture is processed in a compression manner. The method is small and has very high loading speed, so that the method is used for quick browsing. The method is equivalent to the functions of preview and directory of picture files.
The application scenario described in the embodiment of the present application is for more clearly illustrating the technical solution of the embodiment of the present application, and does not form a limitation on the technical solution provided in the embodiment of the present application, and it can be known by a person skilled in the art that with the occurrence of a new application scenario, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems. In the description of the present application, the term "plurality" means two or more unless otherwise specified.
In order to better understand the technical solution provided by the embodiments of the present application, the following brief description is made on the basic principle of the solution:
in the field of cameras, photographing performance is an index of great interest to users, and thumbnail generation is very important photographing performance. Thumbnails as shown in fig. 1, the picture in the lower right circle is a thumbnail of the current photograph. After the user takes pictures through the terminal, the taken pictures are displayed in a thumbnail mode. The method for generating the thumbnail at the current terminal comprises the steps of obtaining an actual photo, processing the actual photo to obtain bitmap data required by thumbnail generation, and generating the thumbnail according to the bitmap data. The thumbnail generated by the existing method is obtained according to the actual picture, so that the time for generating the thumbnail is long, and the problem is caused that the user feels that the photographing speed is slow, so that the photographing experience of the user is not good.
In view of the above, the present application provides a thumbnail generation method and a terminal, which call back photographing data acquired at a hardware abstraction layer to a system application layer through a pre-added call-back channel without transmission through an existing channel; and the photographing data is transcoded in the callback channel, so that the time for generating the thumbnail can be greatly reduced, and the user experience is improved.
For the convenience of understanding, the technical solutions provided in the present application are further described below with reference to the accompanying drawings.
As shown in fig. 2, in the basic architecture of an Android, a System application Layer (System Apps), a Java (a programming language) interface Framework Layer (Java API Framework), a C language library Layer (Native C/C + + Libraries), an operating environment Layer (Android Runtime), and a Hardware Abstraction Layer (HAL) are respectively arranged from top to bottom.
The system application layer is various applications which are directly contacted when the intelligent terminal of the android system is used; the Java interface framework layer provides various interfaces for upper application; the C language library layer is integrated with a plurality of open source libraries, and a plurality of packaged methods are provided; the running environment layer integrates system running related programs; the purpose of the hardware abstraction layer is to abstract the hardware. In the prior art, after a terminal receives a photographing instruction sent by a user at a system application layer, photographing execution passes through a Java interface framework layer, a C language library layer and an operating environment layer, finally reaches a hardware abstraction layer, and photographing data is obtained at the hardware abstraction layer according to the photographing instruction; the shooting data is processed by the C language library layer, the running environment layer and the Java interface framework layer, then returns to the system application layer from the hardware abstraction layer, and generates a thumbnail according to the shooting data of the system application layer, so that the time for obtaining the thumbnail is longer.
In the embodiment of the application, the thumbnail can be acquired in two ways, namely a method when the flash is turned on and a method when the flash is turned off. These two methods will be described in detail below.
Firstly, when the flash lamp is turned off:
in the embodiment of the application, when the user uses the terminal to take a picture, the user may not use the flash lamp but directly take the picture. In view of this, in the embodiment of the present application, a method for generating a thumbnail is provided, which may be specifically implemented as: and if the flash lamp is in a closed state, acquiring preview frame data, and obtaining a thumbnail according to the preview frame data.
Specifically, when the flash lamp is in the off state, after the terminal responds to a photographing instruction of a user, preview frame data is acquired through the video display control textview. After the preview frame data are obtained, the preview frame data are transcoded into bitmap data required by thumbnail generation, and thus the thumbnail is generated.
The preview frame data is acquired by using the video display control textview, so that the preview frame data can be acquired more quickly, and the time for generating the thumbnail is further reduced.
In the embodiment of the present application, the generated thumbnail is not obtained from the photographed data of the actual photograph, and therefore, the thumbnail can be generated in advance. Therefore, when no external environment interference exists or the external environment interference is small, the thumbnail can be generated more quickly by generating the thumbnail through the preview frame data.
Secondly, when the flash lamp is started:
in the embodiment of the application, in order to enable the photo to be shot more perfectly or under the condition of dark external light, a flash lamp may be turned on during photographing, so that the obtained preview frame and the actual photo have a large difference, and if the thumbnail of the photo is determined according to the preview frame, the generated thumbnail has a large difference from the actual photo. In order to make the generated thumbnail more conform to an actual photo, when a flash is turned on for taking a photo, another method for generating the thumbnail is provided in the embodiment of the application.
In the embodiment of the application, a callback channel is added in the system in advance, after a terminal receives a photographing instruction sent by a user at a system application layer, photographing execution is performed through a Java interface framework layer, a C language library layer and a running environment layer, and finally the photographing instruction reaches a hardware abstraction layer, and photographing data is obtained at the hardware abstraction layer according to the photographing instruction; and the photographing data is recalled to the system application layer through the added callback channel, and the terminal acquires the thumbnail in the system application layer according to the photographing data. The embodiments of the present application will be described in further detail with reference to the drawings attached to the specification.
As shown in fig. 3, a method for generating a thumbnail in an embodiment of the present application specifically includes the following steps:
step 301: and responding to the photographing instruction to acquire photographing data in the hardware abstraction layer.
Specifically, the photographing data acquired at the hardware abstraction layer is YUV (a color coding method) data.
Step 302: and transcoding the acquired photographing data through a pre-added callback channel, and calling back the transcoded photographing data to a system application layer through the callback channel.
Specifically, a callback channel is opened up for the photographing data independently in the embodiment of the application, the processing process of the photographing data in the hardware abstraction layer is omitted, and the time consumed by the encoding process is also omitted. And the photographing data is directly called back to the system application layer from the hardware abstraction layer according to the call-back channel, so that the thumbnail can be rapidly generated according to the photographing data.
In the embodiment of the application, adding the callback channel requires registering the callback at first, adding the callback in the takepicture function, and registering the callback in the frame (framework) of the android system. In the android architecture, the call is called from a system application layer through a step-by-step JNI (Java Native Interface ), and finally the call is registered in a hardware abstraction layer, so that the whole process of adding the callback is completed.
Step 303: and generating a thumbnail in the system application layer according to the transcoded photographing data.
Therefore, the shooting data acquired by the hardware abstraction layer is called back to the system application layer through the pre-added call-back channel without being transmitted through the existing channel; and the photographing data is transcoded in the callback channel, so that the time for generating the thumbnail can be greatly reduced, and the user experience is improved.
In the embodiment of the application, since the photographing data acquired at the hardware abstraction layer is in YUV format and cannot be directly acquired as a thumbnail, a transcoding process needs to be added to the callback channel, which may be specifically implemented as steps a 1-A3:
step A1: and calling back the acquired photographing data to a C language library layer through the call-back channel.
Step A2: and converting the photographing data into the photographing data in a bitmap file format according to a native development kit NDK.
Step A3: and calling back the photographing data in the bitmap file format to a system application layer through the call-back channel.
In the embodiment of the application, the thumbnail is generated in the system application layer according to the photographing data in the bitmap file format.
In this way, the NDK is used for transcoding the photographing data in the C language library layer, so that the transcoding speed can be increased, the obtained photographing data in the bitmap file format can be faster, and the time for generating the thumbnail can be further reduced.
As shown in fig. 4, a complete method for generating a thumbnail provided in an embodiment of the present application includes:
step 401: responding to a photographing instruction, and determining whether a flash lamp is in an open state; if yes, go to step 402; if not, go to step 407.
Step 402: and acquiring photographing data at a hardware abstraction layer.
Step 403: and calling back the acquired photographing data to a C language library layer through the call-back channel.
Step 404: and converting the photographing data into the photographing data in a bitmap file format according to a native development kit NDK.
Step 405: and calling back the photographing data in the bitmap file format to a system application layer through the call-back channel.
Step 406: and generating a thumbnail in the system application layer according to the photographing data in the bitmap file format.
Step 407: and acquiring preview frame data through a video display control textview.
Step 408: and obtaining a thumbnail according to the preview frame data.
In this way, different generation methods are adopted to generate the thumbnail when the flash is turned on and turned off, and the generation method can be more flexible.
As shown in fig. 5, an embodiment of the present application further provides a terminal for generating a thumbnail, where the terminal includes: a processor 510, and a camera 520;
the camera 520: for acquiring an image;
the processor 510: the hardware abstraction layer is used for responding to a photographing instruction to acquire photographing data of the camera 520; the acquired photographing data is transcoded through a pre-added callback channel, and the transcoded photographing data is recalled to a system application layer through the callback channel; and generating a thumbnail in the system application layer according to the transcoded photographing data.
Optionally, the processor 510 is specifically configured to:
the acquired photographing data of the camera 520 is called back to a C language library layer through the call-back channel in the hardware abstraction layer;
converting the photographing data into photographing data in a bitmap file format according to a native development kit NDK;
calling back the photographing data in the bitmap file format to a system application layer through the call-back channel;
and generating a thumbnail in the system application layer according to the photographing data in the bitmap file format.
Optionally, the terminal further includes a flash, and the processor 510 is specifically configured to:
and after the flash lamp is determined to be in the on state, transcoding the photographing data of the hardware abstraction layer through a pre-added callback channel.
Optionally, the processor 510 is specifically configured to:
and if the flash lamp is in a closed state, acquiring preview frame data, and obtaining a thumbnail according to the preview frame data.
Optionally, the processor 510 is specifically configured to:
and acquiring preview frame data through a video display control textview.
As shown in fig. 6, an embodiment of the present application further provides a terminal for generating a thumbnail, where the terminal includes a response module 601, a callback module 602, and a first generation module 603:
the response module 601 is configured to respond to a photographing instruction to obtain photographing data in a hardware abstraction layer;
the callback module 602 is configured to transcode the acquired photographing data through a callback channel added in advance, and call back the transcoded photographing data to a system application layer through the callback channel;
a first generating module 603, configured to generate a thumbnail in the system application layer according to the transcoded photographing data.
In one possible implementation, the callback module 602 includes:
the first callback unit is used for calling back the acquired photographing data to a C language library layer through the callback channel;
the transcoding unit is used for converting the photographing data into the photographing data in a bitmap file format according to a native development kit NDK;
the second callback unit is used for calling back the photographing data in the bitmap file format to a system application layer through the callback channel;
the first generating module 603 is specifically configured to generate a thumbnail in the system application layer according to the photographing data in the bitmap file format.
In a possible implementation manner, the terminal further includes:
and the determining module is used for transcoding the acquired photographing data through a pre-added callback channel by the callback module, and determining that the flash lamp is in an open state before the transcoded photographing data is recalled to the system application layer through the callback channel.
In a possible implementation manner, the terminal further includes:
and the second generation module is used for acquiring preview frame data if the flash lamp is in a closed state, and obtaining a thumbnail according to the preview frame data.
In a possible implementation manner, the second generation module is specifically configured to obtain the preview frame data through the video presentation control textview.
The following describes the various components of the terminal 700 in detail with reference to fig. 7:
the RF circuit 710 may be used for receiving and transmitting data during a communication or conversation. Specifically, the RF circuit 710 sends the downlink data of the base station to the processor 730 for processing after receiving the downlink data; and in addition, sending the uplink data to be sent to the base station. Generally, the RF circuit 710 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 710 may also communicate with a network and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The WiFi technology belongs to a short-distance wireless transmission technology, and the terminal 700 may connect to an Access Point (AP) through a WiFi module 790, thereby implementing Access to a data network. The WiFi module 790 may be used for receiving and transmitting data during communication.
The terminal 700 may be physically connected to other terminals through the communication interface 780. In some embodiments, the communication interface 780 is connected to the communication interface of the other terminal through a cable, so as to realize data transmission between the terminal 700 and the other terminal.
In the embodiment of the present application, the terminal 700 can implement a communication service and send information to other contacts, so the terminal 700 needs to have a data transmission function, that is, the terminal 700 needs to include a communication module inside. Although fig. 7 shows communication modules such as the RF circuit 710, the WiFi module 790, and the communication interface 780, it is understood that at least one of the above components or other communication modules (e.g., bluetooth module) for implementing communication exists in the terminal 700 for data transmission.
For example, when the terminal 700 is a mobile phone, the terminal 700 may include the RF circuit 710 and may further include the WiFi module 790; when the terminal 700 is a computer, the terminal 700 may include the communication interface 780 and may further include the WiFi module 790; when the terminal 700 is a tablet computer, the terminal 700 may include the WiFi module.
The memory 740 may be used to store software programs and modules. The processor 730 executes various functional applications and data processing of the terminal 700 by executing the software programs and modules stored in the memory 740, and after the processor 730 executes the program codes in the memory 740, part or all of the processes in fig. 3 of the embodiments of the present disclosure can be implemented.
In some embodiments, the memory 740 may mainly include a program storage area and a data storage area. The storage program area can store an operating system, various application programs (such as communication application), a face recognition module and the like; the storage data area may store data (such as various multimedia files like pictures, video files, etc., and face information templates) created according to the use of the terminal, etc.
In addition, the memory 740 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 750 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the terminal 700.
In some embodiments, the input unit 750 may include a touch panel 751 and other input terminals 752.
The touch panel 751, also referred to as a touch screen, can collect touch operations of a user (such as a user's operation of a finger, a stylus, or any other suitable object or accessory on or near the touch panel 751) and drive a corresponding connection device according to a preset program. In some embodiments, the touch panel 751 may include two portions, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 730, and can receive and execute commands sent by the processor 730. In addition, the touch panel 751 may be implemented in various types, such as resistive, capacitive, infrared, and surface acoustic wave.
In some embodiments, the other input terminals 752 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 760 may be used to display information input by a user or information provided to the user and various menus of the terminal 700. The display unit 760 is a display system of the terminal 700, and is configured to present an interface to implement human-computer interaction.
Further, the touch panel 751 can cover the display panel 761, and when the touch panel 751 detects a touch operation thereon or nearby, the touch panel is transmitted to the processor 730 to determine the type of the touch event, and then the processor 730 provides a corresponding visual output on the display panel 761 according to the type of the touch event.
Although in fig. 7, the touch panel 751 and the display panel 761 are implemented as two separate components to implement the input and output functions of the terminal 700, in some embodiments, the touch panel 751 and the display panel 761 can be integrated to implement the input and output functions of the terminal 700.
The processor 730 is a control center of the terminal 700, connects various components using various interfaces and lines, performs various functions of the terminal 700 and processes data by operating or executing software programs and/or modules stored in the memory 740 and calling data stored in the memory 740, thereby implementing various services based on the terminal.
In some embodiments, the processor 730 may include one or more processors. In some embodiments, the processor 730 may integrate an application processor and a modem processor, wherein the application processor mainly handles operating systems, user interfaces, application programs, and the like, and the modem processor mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 730.
The camera 770 is used for implementing a shooting function of the terminal 700 and shooting pictures or videos. The camera 770 may also be used to implement a scanning function of the terminal 700, and scan a scanned object (two-dimensional code/barcode).
The terminal 700 also includes a power supply 720, such as a battery, for powering the various components. In some embodiments, the power supply 720 may be logically connected to the processor 730 through a power management system, so as to manage charging, discharging, and power consumption functions through the power management system.
Although not shown, the terminal 700 may further include at least one sensor, an audio circuit, and the like, which will not be described herein.
Wherein memory 730 may store the same program code as memory 520 that, when executed by processor 720, causes processor 720 to perform all of the functions of processor 510.
An embodiment of the present application further provides a computer-readable non-volatile storage medium, which includes program code, and when the program code runs on a computing terminal, the program code is configured to enable the computing terminal to execute the steps of the method for processing an application according to the embodiment of the present application.
The present application is described above with reference to block diagrams and/or flowchart illustrations of methods, apparatus (systems) and/or computer program products according to embodiments of the application. It will be understood that one block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, and/or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer and/or other programmable data processing apparatus, create means for implementing the functions/acts specified in the block diagrams and/or flowchart block or blocks.
Accordingly, the subject application may also be embodied in hardware and/or in software (including firmware, resident software, micro-code, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium having computer-usable or computer-readable program code embodied in the medium for use by or in connection with an instruction execution system. In the context of this application, a computer-usable or computer-readable medium may be any medium that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (8)

1. A thumbnail generation terminal characterized by comprising: a processor and a camera;
the camera is characterized in that: for acquiring an image;
the processor: the camera is used for responding to a photographing instruction to acquire photographing data of the camera at a hardware abstraction layer; the acquired photographing data of the camera is called back to a C language library layer through the call-back channel in the hardware abstraction layer; converting the photographing data into photographing data in a bitmap file format according to a native development kit NDK; calling back the photographing data in the bitmap file format to a system application layer through the call-back channel; and generating a thumbnail in the system application layer according to the photographing data in the bitmap file format.
2. The terminal of claim 1, wherein the terminal further comprises a flash;
the processor is specifically configured to:
and after the flash lamp is determined to be in the on state, transcoding the photographing data of the hardware abstraction layer through a pre-added callback channel.
3. The terminal of claim 2, wherein the processor is further specifically configured to:
and if the flash lamp is in a closed state, acquiring preview frame data, and obtaining a thumbnail according to the preview frame data.
4. The terminal of claim 3, wherein the processor is further specifically configured to:
and acquiring preview frame data through a video display control textview.
5. A thumbnail generation method, characterized in that the method comprises:
responding to a photographing instruction to obtain photographing data in a hardware abstraction layer;
calling back the acquired photographing data to a C language library layer through the call-back channel;
converting the photographing data into photographing data in a bitmap file format according to a native development kit NDK;
calling back the photographing data in the bitmap file format to a system application layer through the call-back channel;
and generating a thumbnail in the system application layer according to the photographing data in the bitmap file format.
6. The method of claim 5, wherein before the callback channel recalls the captured photographing data to a C language library layer, the method further comprises:
it is determined that the flash is in an on state.
7. The method of claim 6, further comprising:
and if the flash lamp is in a closed state, acquiring preview frame data, and obtaining a thumbnail according to the preview frame data.
8. The method of claim 7, wherein the obtaining preview frame data comprises:
and acquiring preview frame data through a video display control textview.
CN201910984834.3A 2019-10-16 2019-10-16 Thumbnail generation method and terminal Active CN112672035B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910984834.3A CN112672035B (en) 2019-10-16 2019-10-16 Thumbnail generation method and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910984834.3A CN112672035B (en) 2019-10-16 2019-10-16 Thumbnail generation method and terminal

Publications (2)

Publication Number Publication Date
CN112672035A CN112672035A (en) 2021-04-16
CN112672035B true CN112672035B (en) 2022-02-22

Family

ID=75400638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910984834.3A Active CN112672035B (en) 2019-10-16 2019-10-16 Thumbnail generation method and terminal

Country Status (1)

Country Link
CN (1) CN112672035B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113645409B (en) * 2021-08-16 2022-08-19 展讯通信(上海)有限公司 Photographing processing method and device, photographing method, device and system and terminal equipment
CN116389884B (en) * 2023-02-24 2024-03-26 荣耀终端有限公司 Thumbnail display method and terminal equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106603910A (en) * 2016-11-28 2017-04-26 上海传英信息技术有限公司 Photo saving method based on intelligent terminal
CN106657765A (en) * 2016-10-19 2017-05-10 上海传英信息技术有限公司 Thumbnail generation method and user terminal
CN107509038A (en) * 2017-10-16 2017-12-22 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN107959845A (en) * 2017-11-13 2018-04-24 北京小鸟看看科技有限公司 The method, apparatus of view data transmission, client terminal device and wear display device
CN108124099A (en) * 2017-12-14 2018-06-05 Tcl移动通信科技(宁波)有限公司 A kind of method, mobile terminal and the storage medium of the generation of camera thumbnail
CN110177215A (en) * 2019-06-28 2019-08-27 Oppo广东移动通信有限公司 Image processing method, image processor, filming apparatus and electronic equipment

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657765A (en) * 2016-10-19 2017-05-10 上海传英信息技术有限公司 Thumbnail generation method and user terminal
CN106603910A (en) * 2016-11-28 2017-04-26 上海传英信息技术有限公司 Photo saving method based on intelligent terminal
CN107509038A (en) * 2017-10-16 2017-12-22 维沃移动通信有限公司 A kind of image pickup method and mobile terminal
CN107959845A (en) * 2017-11-13 2018-04-24 北京小鸟看看科技有限公司 The method, apparatus of view data transmission, client terminal device and wear display device
CN108124099A (en) * 2017-12-14 2018-06-05 Tcl移动通信科技(宁波)有限公司 A kind of method, mobile terminal and the storage medium of the generation of camera thumbnail
CN110177215A (en) * 2019-06-28 2019-08-27 Oppo广东移动通信有限公司 Image processing method, image processor, filming apparatus and electronic equipment

Also Published As

Publication number Publication date
CN112672035A (en) 2021-04-16

Similar Documents

Publication Publication Date Title
CN110659028B (en) Data processing system, method, device, electronic equipment and storage medium
EP3110188A1 (en) Method and device for accessing operator network
US10957012B2 (en) System and method for processing image information
WO2018077041A1 (en) Method and apparatus for running application
US11797255B2 (en) Preview display method based on multi-angle and communication system
CN107241552B (en) Image acquisition method, device, storage medium and terminal
US20170013456A1 (en) Method and device for testing a terminal
CN112995727A (en) Multi-screen coordination method and system and electronic equipment
CN112672035B (en) Thumbnail generation method and terminal
CN110839073A (en) Method for acquiring push information, method and device for sending push information
WO2022078295A1 (en) Device recommendation method and electronic device
CN108965611B (en) Shooting interface switching method, device, equipment and storage medium
CN106792442B (en) Data migration method and device
CN112162716A (en) File transmission method, device, terminal and storage medium
CN110618806B (en) Application program control method and device, electronic equipment and storage medium
CN111966254A (en) Image shooting method and device, storage medium and terminal
WO2022134875A1 (en) Data acquisition method and electronic device
EP3128722A1 (en) File transmission method and apparatus, computer program and recording medium
CN108984677B (en) Image splicing method and terminal
CN111290672A (en) Image display method and device, storage medium and terminal
CN110908618A (en) File printing method and device and storage medium
CN112446366A (en) Image translation evaluating method and device for image translation evaluating
CN108959073B (en) Method and device for testing algorithm library, storage medium and electronic equipment
CN112543278B (en) Method and terminal for adjusting contrast
CN113095485B (en) Performance index determination method, device, system, electronic equipment and storage 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
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee after: Qingdao Hisense Mobile Communication Technology Co.,Ltd.

Address before: 266071 Shandong city of Qingdao province Jiangxi City Road No. 11

Patentee before: HISENSE MOBILE COMMUNICATIONS TECHNOLOGY Co.,Ltd.