CN117082335A - Image display method, device and storage medium - Google Patents

Image display method, device and storage medium Download PDF

Info

Publication number
CN117082335A
CN117082335A CN202210490981.7A CN202210490981A CN117082335A CN 117082335 A CN117082335 A CN 117082335A CN 202210490981 A CN202210490981 A CN 202210490981A CN 117082335 A CN117082335 A CN 117082335A
Authority
CN
China
Prior art keywords
size
display
preview
aspect ratio
preview size
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210490981.7A
Other languages
Chinese (zh)
Inventor
胡青青
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202210490981.7A priority Critical patent/CN117082335A/en
Publication of CN117082335A publication Critical patent/CN117082335A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2628Alteration of picture size, shape, position or orientation, e.g. zooming, rotation, rolling, perspective, translation

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The disclosure relates to an image display method, an image display device and a storage medium. The image display method comprises the following steps: the method comprises the steps that an application of a receiving terminal calls a camera to obtain an image acquisition instruction of an image according to a preset preview size; determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application, wherein the display size comprises the size of a display area of the application; if yes, adjusting a preset preview size, and acquiring an image according to the adjusted preview size; the acquired image is displayed in the application according to the display size. When the method is applied, the image displayed in the application cannot be greatly stretched or compressed, and the user experience is improved.

Description

Image display method, device and storage medium
Technical Field
The disclosure relates to the field of information technology, and in particular, to a method and device for displaying an image, and a storage medium.
Background
Applications in the terminal need to call the camera capability to complete when using functions such as scanning, photographing and the like. However, because the capability of developers of different applications is uneven, when different applications set preview sizes in the camera, if the display sizes of the display areas in the applications are greatly different from the display sizes of the display areas in the applications, the display problem of stretching or compressing the preview images of the camera can occur, and the use experience of users is seriously affected.
Therefore, how to make the image display in the application not to have the phenomenon of stretching or compressing the image is a problem to be solved.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method, apparatus, and storage medium for displaying an image.
According to a first aspect of embodiments of the present disclosure, there is provided a display method of an image, applied to a terminal, the display method including:
receiving an image acquisition instruction of an application calling camera of the terminal to acquire an image according to a preset preview size;
determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application, wherein the display size comprises the size of a display area of the application;
if yes, adjusting the preset preview size, and acquiring an image according to the adjusted preview size;
and displaying the acquired image in the application according to the display size.
In an exemplary embodiment, the determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application includes:
and determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size.
In an exemplary embodiment, the determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size includes:
determining a difference between the aspect ratio of the preset preview size and the aspect ratio of the display size;
and if the difference value is larger than a preset threshold value, determining that the preset preview size needs to be adjusted.
In an exemplary embodiment, said adjusting said preset preview size according to comprises:
acquiring a preview size supported by a camera;
and determining the adjusted preview size according to the preview size supported by the camera and the display size.
In an exemplary embodiment, the determining the adjusted preview size according to the preview size supported by the camera and the display size includes:
acquiring the aspect ratio of the preview size supported by the camera, and determining the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size;
and determining the adjusted preview size according to the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size.
In an exemplary embodiment, the determining the adjusted preview size according to a difference between an aspect ratio of the preview size supported by the camera and an aspect ratio of the display size includes:
and selecting a preview size with the smallest difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size as the adjusted preview size.
In an exemplary embodiment, the preset preview size and the display size are set by the application.
According to a second aspect of embodiments of the present disclosure, there is provided a display device of an image, applied to a terminal, the display device including:
the receiving module is configured to receive an image acquisition instruction of an application calling camera of the terminal to acquire an image according to a preset preview size;
a determining module configured to determine whether the preset preview size needs to be adjusted according to the preset preview size and a display size of the application, wherein the display size includes a size of a display area of the application;
the adjusting module is configured to adjust the preset preview size if yes, and acquire an image according to the adjusted preview size;
and the display module is configured to display the acquired image in the application according to the display size.
In an exemplary embodiment, the determination module is further configured to:
and determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size.
In an exemplary embodiment, the determination module is further configured to:
determining a difference between the aspect ratio of the preset preview size and the aspect ratio of the display size;
and if the difference value is larger than a preset threshold value, determining that the preset preview size needs to be adjusted.
In an exemplary embodiment, the adjustment module is further configured to:
acquiring a preview size supported by a camera;
and determining the adjusted preview size according to the preview size supported by the camera and the display size.
In an exemplary embodiment, the adjustment module is further configured to:
acquiring the aspect ratio of the preview size supported by the camera, and determining the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size;
and determining the adjusted preview size according to the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size.
In an exemplary embodiment, the adjustment module is further configured to:
and selecting a preview size with the smallest difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size as the adjusted preview size.
In an exemplary embodiment, the preset preview size and the display size are set by the application.
According to a third aspect of the embodiments of the present disclosure, there is provided a display device of an image, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method according to any of the first aspects of the embodiments of the present disclosure.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer readable storage medium, which when executed by a processor of an apparatus, causes the apparatus to perform the method according to any one of the first aspects of embodiments of the present disclosure.
The method has the following beneficial effects: when the application of the terminal calls the camera, the preset preview size is determined whether to be adjusted according to the preset preview size and the display size by acquiring the display size of the display area of the application and the preset preview size of the camera set by the application, when the preset preview size is determined to be adjusted, the preset preview size is adjusted, and the image is acquired according to the adjusted preview size, so that the acquired image is not stretched or compressed greatly when the acquired image is displayed in the display area of the application according to the display size, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow chart illustrating a method of displaying an image according to an exemplary embodiment;
FIG. 2 is a flowchart illustrating a method of determining whether a preset preview size needs to be adjusted according to an aspect ratio of the preset preview size and an aspect ratio of a display size, according to an exemplary embodiment;
fig. 3 is a flowchart illustrating the adjustment of the preset preview size in step S103 according to an exemplary embodiment;
FIG. 4 is a flowchart illustrating a method of determining an adjusted preview size based on a preview size and a display size supported by a camera, according to an exemplary embodiment;
FIG. 5 is a block diagram of a display device for an image, shown according to an exemplary embodiment;
fig. 6 is a block diagram of a display device for an image according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
In an exemplary embodiment of the present disclosure, a method for displaying an image is provided, and the method is applied to a terminal, where the terminal includes an electronic device with a camera function, such as a smart phone, a tablet, and the like. Fig. 1 is a flowchart illustrating a method of displaying an image according to an exemplary embodiment, and as shown in fig. 1, the method of displaying an image includes the steps of:
step S101: the method comprises the steps that an application of a receiving terminal calls a camera to obtain an image acquisition instruction of an image according to a preset preview size;
step S102: determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application, wherein the display size comprises the size of a display area of the application;
step S103: if yes, adjusting a preset preview size, and acquiring an image according to the adjusted preview size;
step S104: the acquired image is displayed in the application according to the display size.
In an exemplary embodiment of the present disclosure, in order to overcome the problem that in the related art, due to the negligence of a software developer, when a camera function of a terminal is invoked, a preset preview size and a display size of an image display area are greatly different, so that an image frame obtained by displaying is stretched or compressed, a display method of an image is provided. Receiving an image acquisition instruction of an application calling camera of the terminal to acquire an image according to a preset preview size; determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the display area of the application; if yes, adjusting a preset preview size, and acquiring an image according to the adjusted preview size; the acquired image is displayed in the application according to the display size. The method comprises the steps of presetting a preview size, wherein the preset preview size comprises a preview size obtained by applying an image set to a camera; the display size includes a size of a display area of the application setting.
When the application of the terminal needs to use the scene of the camera, for example, when the functions of sweeping, photographing and the like are used, the camera of the terminal system can be called through the setting interface, and meanwhile, a display area is set in the application so as to display the preview image acquired through the camera. When the camera is called, a preset preview size needs to be set to the camera in advance. When the camera receives a call instruction, acquiring an image according to a preset preview size set by the application, returning the acquired image data to the application, and displaying the image acquired by the camera in a display area set by the application according to the returned image data of the camera by the application. When the preset preview size of the image acquired by the camera set by the application is larger than the display size of the display area of the application, the size of the acquired image is inconsistent with the size of the display area, which causes the problem of stretching or compressing the image picture, for example, when the preset preview size is 13.2mm×8.8mm and the display size is 10mm×8mm, the length and width of the image acquired by the camera are larger than the length and width of the display area, so that the acquired image can be compressed during display, so that the acquired image can be displayed in the display area of the application.
Therefore, when an image acquisition instruction of an application call camera of the terminal for acquiring an image according to a preset preview size is received, the terminal system acquires and stores the display size of the display area of the application set by the application, and simultaneously acquires the preset preview size of the application for acquiring the image set by the application to the camera, and determines whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the display area of the application, so that the preview size is matched with the display size.
When it is determined that the preset preview size needs to be adjusted, the preview size is adjusted, and an image is acquired according to the adjusted preview size, where the adjustment of the preview size may be any rule capable of adjusting the preset preview size to a preview size that is smaller than the display size. After the application receives the image returned by the camera, the acquired image is displayed in a display area in the application according to the display size, the image acquired according to the adjusted preview size has smaller phase difference with the display size, and when the image is displayed in the application according to the display size, the phenomenon that the image is stretched or compressed greatly does not occur.
In an exemplary embodiment of the present disclosure, when an application of a terminal calls a camera, by acquiring a display size of a display area of the application, and applying the set camera to acquire a preset preview size of an image, determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size, when the preset preview size needs to be adjusted, adjusting the preset preview size, and acquiring an image according to the adjusted preview size, so that when the acquired image is displayed in the display area of the application according to the display size, an image frame is not greatly stretched or compressed, and user experience is improved.
In an exemplary embodiment, determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application includes: it is determined whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size.
When the preset preview size and the display size are different, if the aspect ratio is the same, the image can be scaled, and the image frame does not appear a distortion phenomenon caused by single stretching or compression of the width and height. For example, when the preset preview size is 8mm×8mm and the display size is 7mm×7mm, the aspect ratios are 1 although the sizes are different, and at this time, the image can be directly acquired according to the preset preview size, and it is determined that the preset preview size does not need to be adjusted.
Whether the preset preview size is adjusted or not is determined according to the aspect ratio of the preset preview size and the aspect ratio of the display size, and whether deformation caused by stretching or compression occurs or not can be accurately judged when the image is displayed.
In an exemplary embodiment, as shown in fig. 2, determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size includes the steps of:
step S201: determining a difference value between an aspect ratio of a preset preview size and an aspect ratio of a display size;
step S202: if the difference is greater than the preset threshold, determining that the preset preview size needs to be adjusted.
After the aspect ratio of the preset preview size and the aspect ratio of the display size are determined, calculating the difference value of the preset preview size and the display size, and determining that the preset preview size needs to be adjusted when the difference value is larger than a preset threshold value. The preset threshold value can be set according to actual requirements, for example, 0.1. When the difference value is smaller than the preset threshold value, the aspect ratio of the preset preview size is not greatly different from the aspect ratio of the display size, and obvious stretching or compression phenomenon does not occur when the image is displayed according to the display size, and the preset preview size does not need to be adjusted at the moment; when the difference is larger than the preset threshold, it is indicated that the aspect ratio of the preset preview size and the aspect ratio of the display size differ greatly, and at this time, the preset preview size needs to be adjusted so that the aspect ratio of the acquired image is maximally close to the aspect ratio of the display size.
By the difference of the aspect ratio of the preset preview size and the aspect ratio of the display size, it can be more accurately determined whether the preset preview size needs to be adjusted.
In an exemplary embodiment, fig. 3 is a flowchart illustrating the adjustment of the preset preview size in step S103 according to an exemplary embodiment, as shown in fig. 3, including the steps of:
step S301: acquiring a preview size supported by a camera;
step S302: and determining the adjusted preview size according to the preview size and the display size supported by the camera.
When the preset preview size is adjusted, all the preview sizes supported by the camera or the partial preview sizes supported by the camera and having smaller difference from the display size can be obtained. According to the preview size and the display size supported by the camera, the adjusted preview size is determined, so that the adjusted preview size is matched with the display size and is also the preview size supported by the terminal, and the terminal can normally acquire the image.
In an exemplary embodiment, as shown in fig. 4, the method for determining the adjusted preview size according to the preview size and the display size supported by the camera includes the following steps:
step S401: acquiring the aspect ratio of the preview size supported by the camera, and determining the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size;
step S402: and determining the adjusted preview size according to the difference value of the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size.
And determining a difference value of the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size according to the aspect ratio of the preview size supported by the camera, and determining the adjusted preview size according to the difference value. For example, when the preview size supported by the camera is the entire preview size supported by the camera, the difference value of the aspect ratio with the display size is sequentially calculated, and the adjusted preview size is determined according to the difference value.
The adjusted preview size can be determined by the difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size, so that the adjusted preview size is more accurate.
In an exemplary embodiment, determining the adjusted preview size based on the difference in the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size includes: the preview size for which the difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size is smallest is selected as the adjusted preview size.
The preview size with the smallest difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size is not only the preview size supported by the camera, but also the preview size with the smallest difference between the aspect ratio of the preview size and the display size, and the preview size is used as the adjusted preview size, so that the image picture can not be greatly stretched or compressed while normally acquiring the image.
In an exemplary embodiment of the present disclosure, when a terminal application invokes a camera, determining, according to an aspect ratio of a display size of the application and an aspect ratio of a preset preview size set by the application, a difference between the aspect ratio of the display size and the aspect ratio of the preset preview size, determining whether the preset preview size needs to be adjusted according to the difference, and when the preset preview size needs to be adjusted, adjusting the preset preview size according to a preview size supported by the camera, acquiring an image according to the adjusted preview size, and displaying the acquired image in the application according to the display size by the application, where a phenomenon that a picture is greatly stretched or compressed does not occur in the image displayed in the application, thereby improving user experience.
In an exemplary embodiment of the present disclosure, a display device of an image is provided, which is applied to a terminal. Fig. 5 is a block diagram of a display device of an image according to an exemplary embodiment, and as shown in fig. 5, the display device of an image includes:
a receiving module 501 configured to receive an image acquisition instruction of an application calling camera of the terminal to acquire an image according to a preset preview size;
a determining module 502 configured to determine whether the preset preview size needs to be adjusted according to the preset preview size and a display size of the application, wherein the display size includes a size of a display area of the application;
an adjusting module 503, configured to adjust the preset preview size if yes, and acquire an image according to the adjusted preview size;
a display module 504 configured to display the acquired image in the application in accordance with the display size.
In an exemplary embodiment, the determining module 502 is further configured to:
and determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size.
In an exemplary embodiment, the determining module 502 is further configured to:
determining a difference between the aspect ratio of the preset preview size and the aspect ratio of the display size;
and if the difference value is larger than a preset threshold value, determining that the preset preview size needs to be adjusted.
In an exemplary embodiment, the adjustment module 503 is further configured to:
acquiring a preview size supported by a camera;
and determining the adjusted preview size according to the preview size supported by the camera and the display size.
In an exemplary embodiment, the adjustment module 503 is further configured to:
acquiring the aspect ratio of the preview size supported by the camera, and determining the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size;
and determining the adjusted preview size according to the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size.
In an exemplary embodiment, the adjustment module 503 is further configured to:
and selecting a preview size with the smallest difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size as the adjusted preview size.
In an exemplary embodiment, the preset preview size and the display size are set by the application.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 6 is a block diagram of a display device 600 of an image shown according to an exemplary embodiment when the device is a terminal.
Referring to fig. 6, apparatus 600 may include one or more of the following components: a processing component 602, a memory 604, a power component 606, a multimedia component 608, an audio component 610, an input/output (I/O) interface 612, a sensor component 614, and a communication component 616.
The processing component 602 generally controls overall operation of the apparatus 600, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to perform all or part of the steps of the methods described above. Further, the processing component 602 can include one or more modules that facilitate interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the processing component 602.
The memory 604 is configured to store various types of data to support operations at the apparatus 600. Examples of such data include instructions for any application or method operating on the apparatus 600, contact data, phonebook data, messages, pictures, videos, and the like. The memory 604 may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk.
The power supply component 606 provides power to the various components of the apparatus 600. The power supply components 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the apparatus 600.
The multimedia component 608 includes a screen between the device 600 and the user that provides an output interface. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may sense not only the boundary of a touch or slide action, but also the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and/or a rear camera. The front camera and/or the rear camera may receive external multimedia data when the apparatus 600 is in an operational mode, such as a photographing mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.
The audio component 610 is configured to output and/or input audio signals. For example, the audio component 610 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 600 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may be further stored in the memory 604 or transmitted via the communication component 616. In some embodiments, audio component 610 further includes a speaker for outputting audio signals.
The I/O interface 612 provides an interface between the processing component 602 and peripheral interface modules, which may be a keyboard, click wheel, buttons, etc. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
The sensor assembly 614 includes one or more sensors for providing status assessment of various aspects of the apparatus 600. For example, the sensor assembly 614 may detect the open/closed state of the device 600, the relative positioning of the components, such as the display and keypad of the device 600, the sensor assembly 614 may also detect a change in position of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration/deceleration of the device 600, and a change in temperature of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscopic sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 616 is configured to facilitate communication between the apparatus 600 and other devices in a wired or wireless manner. The device 600 may access a wireless network based on a communication standard, such as WiFi,2G or 3G, or a combination thereof. In one exemplary embodiment, the communication component 616 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component 616 further includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 600 may be implemented by one or more Application Specific Integrated Circuits (ASICs), digital Signal Processors (DSPs), digital Signal Processing Devices (DSPDs), programmable Logic Devices (PLDs), field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic elements for executing the methods described above.
In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as memory 604, including instructions executable by processor 620 of apparatus 600 to perform the above-described method. For example, the non-transitory computer readable storage medium may be ROM, random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
A non-transitory computer readable storage medium, which when executed by a processor of an apparatus, causes the apparatus to perform a method of displaying an image, the method comprising any of the methods described above.
Other embodiments of the application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (16)

1. A display method of an image, applied to a terminal, the display method comprising:
receiving an image acquisition instruction of an application calling camera of the terminal to acquire an image according to a preset preview size;
determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application, wherein the display size comprises the size of a display area of the application;
if yes, adjusting the preset preview size, and acquiring an image according to the adjusted preview size;
and displaying the acquired image in the application according to the display size.
2. The method according to claim 1, wherein determining whether the preset preview size needs to be adjusted according to the preset preview size and the display size of the application comprises:
and determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size.
3. The method of displaying an image according to claim 2, wherein the determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size comprises:
determining a difference between the aspect ratio of the preset preview size and the aspect ratio of the display size;
and if the difference value is larger than a preset threshold value, determining that the preset preview size needs to be adjusted.
4. The method of displaying an image according to claim 1, wherein said adjusting the preset preview size according to the specification includes:
acquiring a preview size supported by a camera;
and determining the adjusted preview size according to the preview size supported by the camera and the display size.
5. The method according to claim 4, wherein determining the adjusted preview size according to the preview size supported by the camera and the display size comprises:
acquiring the aspect ratio of the preview size supported by the camera, and determining the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size;
and determining the adjusted preview size according to the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size.
6. The method of displaying an image according to claim 5, wherein determining the adjusted preview size based on a difference between an aspect ratio of the preview size supported by the camera and an aspect ratio of the display size comprises:
and selecting a preview size with the smallest difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size as the adjusted preview size.
7. The method of displaying an image according to claim 6, wherein the preset preview size and the display size are set by the application.
8. A display device of an image, applied to a terminal, characterized in that the display device comprises:
the receiving module is configured to receive an image acquisition instruction of an application calling camera of the terminal to acquire an image according to a preset preview size;
a determining module configured to determine whether the preset preview size needs to be adjusted according to the preset preview size and a display size of the application, wherein the display size includes a size of a display area of the application;
the adjusting module is configured to adjust the preset preview size if yes, and acquire an image according to the adjusted preview size;
and the display module is configured to display the acquired image in the application according to the display size.
9. The display device of an image of claim 8, wherein the determination module is further configured to:
and determining whether the preset preview size needs to be adjusted according to the aspect ratio of the preset preview size and the aspect ratio of the display size.
10. The display device of an image of claim 9, wherein the determination module is further configured to:
determining a difference between the aspect ratio of the preset preview size and the aspect ratio of the display size;
and if the difference value is larger than a preset threshold value, determining that the preset preview size needs to be adjusted.
11. The image display device of claim 8, wherein the adjustment module is further configured to:
acquiring a preview size supported by a camera;
and determining the adjusted preview size according to the preview size supported by the camera and the display size.
12. The image display device of claim 11, wherein the adjustment module is further configured to:
acquiring the aspect ratio of the preview size supported by the camera, and determining the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size;
and determining the adjusted preview size according to the difference value between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size.
13. The image display device of claim 12, wherein the adjustment module is further configured to:
and selecting a preview size with the smallest difference between the aspect ratio of the preview size supported by the camera and the aspect ratio of the display size as the adjusted preview size.
14. The image display apparatus according to claim 13, wherein the preset preview size and the display size are set by the application.
15. An image display device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to perform the method of any of claims 1-7.
16. A non-transitory computer readable storage medium, which when executed by a processor of an apparatus, causes the apparatus to perform the method of any of claims 1-7.
CN202210490981.7A 2022-05-07 2022-05-07 Image display method, device and storage medium Pending CN117082335A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210490981.7A CN117082335A (en) 2022-05-07 2022-05-07 Image display method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210490981.7A CN117082335A (en) 2022-05-07 2022-05-07 Image display method, device and storage medium

Publications (1)

Publication Number Publication Date
CN117082335A true CN117082335A (en) 2023-11-17

Family

ID=88701045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210490981.7A Pending CN117082335A (en) 2022-05-07 2022-05-07 Image display method, device and storage medium

Country Status (1)

Country Link
CN (1) CN117082335A (en)

Similar Documents

Publication Publication Date Title
CN108419016B (en) Shooting method and device and terminal
CN105159640B (en) Display interface rotating method and device and mobile terminal
CN112114765A (en) Screen projection method and device and storage medium
CN106101680B (en) Acquisition parameters setting method and device
CN106775235B (en) Screen wallpaper display method and device
CN112463084A (en) Split screen display method and device, terminal equipment and computer readable storage medium
CN115134505B (en) Preview picture generation method and device, electronic equipment and storage medium
CN111614910B (en) File generation method and device, electronic equipment and storage medium
CN112188096A (en) Photographing method and device, terminal and storage medium
CN105808102B (en) Add the method and device of frame
CN112235509B (en) Focal length adjusting method and device, mobile terminal and storage medium
CN106375744B (en) Information projecting method and device
CN110874829B (en) Image processing method and device, electronic device and storage medium
CN117082335A (en) Image display method, device and storage medium
CN114418865A (en) Image processing method, device, equipment and storage medium
CN107682623B (en) Photographing method and device
CN110876013B (en) Method and device for determining image resolution, electronic equipment and storage medium
CN114339187B (en) Image processing method, image processing apparatus, and storage medium
CN110876015B (en) Method and device for determining image resolution, electronic equipment and storage medium
CN111107624B (en) Negative one-screen synchronization method, negative one-screen synchronization device and electronic equipment
CN112346795B (en) Picture processing method, device and storage medium
CN106959875B (en) Front camera opening method, device and equipment
CN118057824A (en) Image processing method, device and storage medium
CN118175420A (en) Image acquisition method, device, equipment and storage medium
CN115705174A (en) Display control method, display control device, 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