WO2016191952A1 - Method and device for displaying photo - Google Patents

Method and device for displaying photo Download PDF

Info

Publication number
WO2016191952A1
WO2016191952A1 PCT/CN2015/080325 CN2015080325W WO2016191952A1 WO 2016191952 A1 WO2016191952 A1 WO 2016191952A1 CN 2015080325 W CN2015080325 W CN 2015080325W WO 2016191952 A1 WO2016191952 A1 WO 2016191952A1
Authority
WO
WIPO (PCT)
Prior art keywords
photo
photos
horizontal
source
vertical
Prior art date
Application number
PCT/CN2015/080325
Other languages
French (fr)
Chinese (zh)
Inventor
郜文美
秦超
刘伟杰
梅敬青
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2015/080325 priority Critical patent/WO2016191952A1/en
Priority to CN201580023615.9A priority patent/CN106462600B/en
Publication of WO2016191952A1 publication Critical patent/WO2016191952A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor

Definitions

  • the embodiments of the present invention relate to terminal technologies, and in particular, to a method and a device for displaying photos.
  • each person's mobile phone stores a large number of photos that they like, and users can display their favorite photos on the mobile phone desktop.
  • the user can pinch the touch screen by two fingers, and the "window widget” option can be seen.
  • the widget has a gallery widget (called “gallery widget” in English), and the user can Select one or more gallery widgets to add to the desktop, and select the appropriate source album for each gallery widget, and each gallery widget will periodically cycle through the photos in the corresponding source album.
  • the embodiment of the invention provides a method and a device for displaying a photo, which can display the horizontal photo in the horizontal photo frame according to the type of the photo to be displayed, and display the vertical photo in the vertical photo frame, thereby improving the user experience.
  • a first aspect provides a method of displaying a photo for use in a display and a plurality of applications
  • a portable electronic device wherein the display comprises a touch-sensitive surface and a display screen, the method comprising:
  • the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1;
  • the photo to be displayed is a horizontal photo, and displaying the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
  • Determining that the photo to be displayed is a vertical photo, and displaying the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
  • the photo type of the photo to be displayed is determined by the portable electronic device or determined in real time, and the photo type includes: a horizontal version Photo and vertical photo.
  • the photo to be displayed is from all the photos of one source album of the k source photo albums. a queue in a horizontal photo queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
  • the photo to be displayed is from a horizontal photo of all the photos of the k source albums A queue in a queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
  • the photo type of the photo to be displayed is determined by the portable electronic device according to the The type of photo displayed is determined by the logo.
  • the method before the displaying a photo wall on the display screen, the method further includes:
  • the k source albums providing photos of the photo wall, the k being an integer not less than 1;
  • the photo wall is determined based on the first ratio.
  • the method further includes:
  • a second aspect provides a portable electronic device including a display screen, comprising:
  • a display module configured to display a photo wall on the display screen, the photo wall includes m horizontal photo frames, n vertical photo frames, and m and n are integers not less than one;
  • a processing module configured to determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
  • the processing module is further configured to determine that the photo to be displayed is a vertical photo, and display the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
  • the photo type of the photo to be displayed is determined by the portable electronic device or determined in real time, and the photo type includes: a horizontal version Photo and vertical photo.
  • the photo to be displayed is from all the photos of one source album of the k source albums. a queue in a horizontal photo queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
  • the photo to be displayed is from a horizontal photo of all the photos of the k source albums A queue in a queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
  • the photo type of the photo to be displayed is determined by the portable electronic device according to the The type of photo displayed is determined by the logo.
  • the processing module is further configured to:
  • the k source albums providing photos of the photo wall, the k being an integer not less than 1;
  • the photo wall is determined based on the first ratio.
  • the processing module is further configured to:
  • a third aspect provides a portable electronic device comprising: a display, one or more processors, a memory, one or more programs; wherein the display comprises a touch-sensitive surface and a display screen, the one or more programs being Stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising first to sixth possibilities for performing the first aspect and the first aspect An instruction to provide the method of any of the methods described.
  • a fourth aspect provides a computer readable storage medium for storing one or more programs, wherein the one or more programs include instructions that are executed when a portable electronic device includes a display and a plurality of applications
  • the portable electronic device displays a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and then determines the type of the photo to be displayed, if to be displayed If the photo is a horizontal photo, the photo to be displayed is displayed in one of the m horizontal photo frames of the photo wall; if the photo to be displayed is a vertical photo, the photo to be displayed is displayed in the n vertical version of the photo wall In a photo frame in the photo frame.
  • the vertical photo can be displayed in the vertical photo frame, and the horizontal photo can be displayed in the horizontal photo frame, thereby ensuring that each photo is displayed with the best effect. user.
  • FIG. 1 is a flowchart of a method for displaying a photo according to Embodiment 1 of the present invention
  • Figure 2 is a schematic view of a photo wall
  • FIG. 5 is a flowchart of a method for generating a photo wall according to Embodiment 2 of the present invention.
  • FIG. 6 is a flowchart of a method for dynamically displaying a photo according to Embodiment 3 of the present invention.
  • FIG. 7 is a schematic diagram of a process for selecting a photo to be displayed according to Embodiment 3 of the present invention.
  • FIG. 8 is a schematic structural diagram of a portable electronic device according to Embodiment 4 of the present invention.
  • FIG. 9 is a portable electronic device according to Embodiment 5 of the present invention.
  • the method provided by the embodiments of the present invention is applied to a portable electronic device including a display and a plurality of applications, including but not limited to a smart phone, a tablet computer, and a personal digital assistant (English full name: Personal Digital Assistant, abbreviation: PDA) And the like, wherein the display comprises a touch-sensitive surface and a display screen, and in particular, the method of the embodiments of the present invention can be implemented by executing a command by a module or chip having a processing function in the portable electronic device described above.
  • a portable electronic device including a display and a plurality of applications, including but not limited to a smart phone, a tablet computer, and a personal digital assistant (English full name: Personal Digital Assistant, abbreviation: PDA) And the like, wherein the display comprises a touch-sensitive surface and a display screen, and in particular, the method of the embodiments of the present invention can be implemented by executing a command by a module or chip having a processing function in the portable electronic device described above.
  • FIG. 1 is a flowchart of a method for displaying a photo according to Embodiment 1 of the present invention. As shown in FIG. 1 , the method provided in this embodiment may include the following steps:
  • execution body of steps 101 to 103 is a portable electronic device including a display and a plurality of applications.
  • Step 101 Display a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1.
  • the pre-generated photo wall is stored in the portable electronic device, and the plurality of photo walls may be a photo wall that is provided by the portable electronic device, or may be designed and added to the portable electronic device according to a user's preference.
  • Each photo wall may include a plurality of photo frames, and each photo frame is used to display a photo.
  • the number of photo frames included in each photo wall may be the same or different, and the photo frames included in each photo wall may be the same type. different.
  • each photo wall includes the following two types of photo frames: a horizontal photo frame and a vertical photo frame.
  • the horizontal photo frame refers to a photo frame with an aspect ratio greater than or equal to 1, for example, an aspect ratio of 16:9, 4:3, 3:2, etc.
  • a vertical photo frame refers to a photo frame having an aspect ratio of less than 1, such as a width.
  • the height ratio is 9:16, 3:4, 2:3, etc.
  • Horizontal photo frames are used to display landscape photos, and vertical photo frames are used to display vertical photos.
  • the horizontal photo refers to a photo having an aspect ratio greater than or equal to 1, for example, an aspect ratio of 16:9, 4:3, 3:2, etc.
  • a vertical photo refers to a photo having an aspect ratio of less than 1.
  • the aspect ratio is 9:16, 3:4, 2:3, and the like.
  • FIG. 2 is a schematic view of a photo wall.
  • photo walls A, B, C, and D there are four photo walls in FIG. 2, wherein there are two types of photo frames in photo walls A, B, C, and D: horizontal photo frames and vertical frames.
  • the photo frame, photo wall A and B respectively have 4 photo frames, which can display 4 photos, 5 photo frames in photo wall C, and 6 photo frames in photo wall D.
  • the photo wall is an editable photo wall, and the user can change the number, type, size and position of the photo frame in the photo wall.
  • a “photo wall widget” option may be added to the “window widget” of the Android system, and the photo wall widget includes the plurality of photo walls, and the user may select a current desired display from the photo wall widget.
  • Photo wall After selecting the photo wall to be displayed, k source albums are set for the selected photo wall, k source albums provide photos for the photo wall, and k is an integer not less than 1.
  • Step 102 Determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall.
  • Step 103 Determine that the photo to be displayed is a vertical photo, and display the photo to be displayed in one of the n vertical photo frames of the photo wall.
  • the photo types of each of the k source albums include horizontal photos and/or vertical photos, ie Some source albums may only include horizontal photos, some source albums may only include vertical photos, and some source albums may include vertical photos and horizontal photos.
  • the photo to be displayed is from one of the k source albums, and the photo type of the photo to be displayed is predetermined by the portable electronic device or determined in real time.
  • the portable electronic device can determine whether the photo to be displayed is a horizontal photo or a vertical photo in the following ways:
  • the photo to be displayed is from a horizontal photo queue and a vertical photo queue in all photos of one source album of the k source albums, wherein each source album includes a horizontal photo queue and In the vertical photo queue, the horizontal photo queue of each source album is composed of all horizontal photos of the source album, and the vertical photo queue of each source album is composed of all vertical photos of the album.
  • the horizontal photo queue and the vertical photo queue only logically divide the photos, and the photos are still stored in the source album, and are not stored in the photo queue.
  • photo queue only the index of the photo is stored.
  • photo queues include, but are not limited to, common data structures in computer fields such as linked lists, arrays, queues, linear tables, stacks, trees, and graphs.
  • a horizontal photo queue and a vertical photo queue of each of the source albums of the k source albums are acquired; then, the photos to be displayed are selected from the horizontal photo queues of the k source albums. Displaying the photo to be displayed in one of the m horizontal photo frames of the photo wall; or, selecting a photo to be displayed from the vertical photo queue of the k source albums, and displaying the photo to be displayed on the photo wall One of the n vertical photo frames. Since all the photos in the horizontal photo queue are horizontal photos, all the photos in the vertical photo queue are vertical photos, so the horizontal photo queue must be selected from the horizontal photo queue. The selected one must be a vertical photo.
  • the photo queue of each of the k source albums of the photo wall is obtained by: predetermining or real-time determining the photo type of each photo in the k source albums, the photo types include: horizontal photo and vertical Version photo.
  • the photo types include: horizontal photo and vertical Version photo.
  • the horizontal photo in the first source album is attributed to the horizontal photo queue of the first source album
  • the vertical photo in the one source album belongs to the vertical photo queue of the first source photo album
  • the first source photo album is any one of the k source photo albums, followed by
  • the photo to be displayed selected from the horizontal photo queue is the horizontal photo, and the photo to be displayed selected from the vertical photo queue. That is, the vertical photo queue does not need to determine the photo type of the photo to be displayed according to the shape of the photo to be displayed.
  • the portable electronic device performs a shape analysis on the new photo to determine the new photo type. Specifically, if the aspect ratio of the new photo is less than 1, it is determined that the new photo is a vertical photo, and if the aspect ratio of the new photo is greater than or equal to 1, the new photo is determined to be a horizontal photo.
  • the portable electronic device starts to shape the photo in each source album. Analyze to determine the photo type and assign the photo to the corresponding photo queue based on the photo type. In this way, the photo can be displayed in the target photo wall after the photo queues of the k source albums are formed, or the number of photos in any one of the photo queues of the k source albums. When it becomes 1, the photo is displayed, and the photo to be displayed is selected from the photo queue whose number of photos becomes 1.
  • the photo to be displayed is displayed in In a photo frame of the m horizontal photo frames of the photo wall; if the photo queue whose photo number becomes 1 is a vertical photo queue, the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall in.
  • the photos to be displayed are selected from the m horizontal photo frames in the photo wall of the M horizontal photo queues; If the total number of photos in the horizontal photo queue is greater than or equal to m, the photo to be displayed is selected from the horizontal photo queue; if the total number of photos in the horizontal photo queue is less than m, all the photos in the horizontal photo queue are selected. And select the photos to be displayed from the other horizontal photo queues in the M horizontal photo queue.
  • the values of M and k are the same. If some of the k source albums do not include the horizontal photo queue, the value of M is less than k. .
  • the photo to be displayed is from a horizontal photo queue and a queue in the vertical photo queue formed by all the photos of the k source albums.
  • the horizontal photo queue and the vertical photo queue of k source albums are obtained.
  • the horizontal photo queue is composed of all horizontal photos of k source albums
  • the vertical photo queue is composed of all vertical photos in k source albums. .
  • select a photo to be displayed from the horizontal photo queue and display the photo to be displayed in one of the m horizontal photo frames of the photo wall; or select a photo to be displayed from the vertical photo queue to be displayed
  • the photo is displayed in a photo frame in the n vertical photo frames of the photo wall.
  • the difference between the second method and the first method is that in the first method, a horizontal photo queue and a vertical photo queue need to be separately created for each source album.
  • k source albums are created.
  • the portable electronic device also needs to determine or determine the photo type of each photo in the K source albums in advance, and then, according to each photo type in the k source albums, in the k source albums.
  • the horizontal photo belongs to the horizontal photo queue, and the vertical photos in the k source albums are assigned to the vertical version. In the photo queue.
  • the photo type of the photo to be displayed is determined according to the type identifier of the photo to be displayed.
  • the third mode it is not necessary to establish a photo queue.
  • the photo to be displayed is selected from the k source albums, and the type identifier of the photo to be displayed is obtained.
  • the type identifier of the photo to be displayed is used to indicate the type of the photo to be displayed, and the type identifier of the photo to be displayed is added in advance according to the type of the photo to be displayed.
  • the type of the photo to be displayed indicates that the photo to be displayed is a horizontal photo
  • the photo to be displayed is displayed in one of the m horizontal photo frames of the photo wall
  • the type of the photo indicates that the photo to be displayed is a vertical photo
  • the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall.
  • the portable electronic device also needs to predetermine the photo type of each photo in the k source albums; and then, for each photo in the k source albums, according to the photo type of each photo in the k source albums A type identifier in which the type of the photo having the same photo type has the same type identifier, and the type of the photo having a different photo type has a different type identifier. For example, adding a first identifier to all horizontal photos in the k source albums, and adding a second identifier to all the vertical photos in the k source albums, the first identifier and the second identifier being different to facilitate distinguishing between the two types photo.
  • the update period of each photo frame in the photo wall may be the same or different. For example, if all photo frames in the photo wall have an update cycle of 30 seconds, then every 30 seconds, a new photo will be selected from the k source albums to replace the original photo displayed in the photo frame. Or, the update period of the m horizontal photo frames is the same as 30 seconds, and the update period of the n vertical photo frames is the same as 20 seconds, then the horizontal photo is selected from the k source albums every 30 seconds to replace the original display in the horizontal photo frame. The photo is taken from the k source albums every 20 seconds to replace the original photo displayed in the vertical photo frame.
  • the update periods of all the photo frames are different from each other, and for each photo frame, a new photo is selected from the k source albums according to the update period of the photo frame to replace the originally displayed photo in the photo frame.
  • a photo frame remains the same, while other photo frames have different update cycles.
  • the photo to be displayed can be randomly displayed. Match any photo frame in any one of the photo frames, or number each photo frame, and display them sequentially according to the serial number. For example, there are 3 vertical photo frames, numbered sequentially. 2, 3, then after selecting the first vertical photo, the first vertical photo is displayed in the vertical photo frame numbered 1, and after selecting the second vertical photo, the second vertical photo is displayed. In the vertical photo frame numbered 2.
  • the portable electronic device displays a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and then determines the type of the photo to be displayed, and if the photo to be displayed is a horizontal photo, The photo to be displayed is displayed in one of the m horizontal photo frames of the photo wall; if the photo to be displayed is a vertical photo, the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall.
  • the vertical photo can be displayed in the vertical photo frame, and the horizontal photo can be displayed in the horizontal photo frame, thereby ensuring that each photo is displayed with the best effect. user.
  • FIG. 3 is a display effect of a photo in the prior art
  • FIG. 4 is a display effect of a photo displayed by the method according to an embodiment of the present invention.
  • a photo of a horizontal photo is displayed in the photo.
  • the characters in the displayed photo will be "tripped" or "face”, and the display effect is not good.
  • the method of the embodiment can make the vertical The photo is displayed in the vertical photo frame, and the horizontal photo is displayed in the horizontal photo frame, so that each photo can be displayed to the user with the best effect.
  • FIG. 5 is a flowchart of a method for generating a photo wall according to the second embodiment of the present invention. As shown in FIG. The method provided can include the following steps:
  • execution body of steps 201 to 203 is a portable electronic device including a display and a plurality of applications.
  • Step 201 Obtain a total number of photos of horizontal photos in the k source albums and a total number of photos of the vertical photos, and k source albums provide photos for the photo wall, and k is an integer not less than 1.
  • the number of photos in the horizontal photo queue in the k source albums can be directly added to obtain photos of the horizontal photos in the k source albums.
  • the total number of photos in the vertical photo queue in the k source albums is added to obtain the total number of photos of the vertical photos in the k source albums.
  • the number of photos in the horizontal photo queue is the total number of horizontal photos in k source albums, and the number of photos in the vertical photo queue. This is the total number of photos in the vertical photo of the k source albums.
  • Electronic devices can also obtain photos of horizontal photos in k source albums by other means. The total number of photos in the total and vertical photos, just to illustrate.
  • Step 202 Calculate a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo.
  • the first ratio is k1:k2.
  • Step 203 Determine a photo wall according to the first ratio.
  • the first ratio is k1:k2
  • the first result obtained by multiplying the total number of photo frames in the photo wall by k1/(k1+k2) is not an integer, the first result can be rounded to obtain the number of horizontal photo frames, and the same reason is used.
  • the second result can be rounded to obtain the number of vertical photo frames, or the total number of photo frames in the photo wall can be used.
  • the number of horizontal photo frames is subtracted from the number to obtain the number of vertical photo frames.
  • the method in this embodiment may further include the following steps: periodically obtaining the total number of photos of the horizontal photo in the k source albums and the total number of photos in the vertical photo; and the total number of photos in the horizontal photo of the k source albums And/or the total number of photos of the vertical photo changes, calculating a second ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; adjusting the number of photo frames in the photo wall according to the second ratio or The type of photo frame.
  • the original photo wall does not contain horizontal photos, but the user gradually took some horizontal photos and horizontal photos. If the number exceeds the threshold number of preset horizontal photos, then the new photo wall should include a horizontal photo frame, and the electronic device adjusts the photo frame type of the original photo wall and the photo frame of the vertical photo frame. And sending an update prompt message to the user, the update prompt can inform the user by means of the notification message, and the user will update after clicking the consent.
  • the method may further include: determining, according to the total number of photos of the horizontal photos in the k source albums, the horizontal photo as the available photo type; according to the vertical photo of the k source albums The total number of photos determines that the vertical photo is the available photo type.
  • the unusable photo type is not considered when calculating the first proportional relationship.
  • the photo type can be determined as the available photo type by the following two methods: In the implementation manner, it is determined whether the total number of photos of the horizontal photo in the k source albums is greater than the threshold value of the horizontal photo; if the total number of photos of the horizontal photo in the k source album is greater than the threshold of the horizontal photo, the horizontal photo is determined The type of photo available. Then, determining whether the total number of photos of the vertical photos in the K source albums is greater than the threshold number of the vertical photos; if the total number of photos of the vertical photos in the k source albums is greater than the threshold number of the vertical photos, determining that the vertical photos are available Photo type. For example, the number threshold of the horizontal photo is 10, and if the total number of photos of the horizontal photo in the k source albums is less than 10, it is determined that the horizontal photo is an unavailable photo type.
  • the scale threshold of the horizontal photo is 5%. If the total number of photos of the horizontal photo in the k source albums is less than 5% of the total number of photos of the k source albums, it is determined that the horizontal photo is an unavailable photo type.
  • the threshold value of the horizontal photo and the threshold of the vertical photo may be the same or different, and the proportional threshold of the horizontal photo and the proportional threshold of the vertical photo may be the same or different.
  • FIG. 6 is a flowchart of a method for dynamically displaying a photo according to Embodiment 3 of the present invention.
  • a plurality of source albums are used, and the determination of the photo type and the establishment of the shape queue of all the photos in the source album are performed in advance.
  • the method in this embodiment may include the following steps:
  • execution body of steps 301 to 306 is a portable electronic device including a display and a plurality of applications.
  • Step 301 Predetermine a photo type of each photo in the k source albums, and assign each photo to a corresponding photo queue of each source album according to the photo type of each photo, where each source album includes two photo queues. : Horizontal photo queues and vertical photo queues.
  • the shape is analyzed and determined.
  • the photo type of the photo create a new photo queue based on the photo type of the photo, or add the photo to the created photo queue.
  • the photo queue of the k source albums can be represented as: photo album of source album 1: L11, L12, photo queue of source album 2: L21, L22, Photo album of source album k: Lk1, Lk2.
  • the photo queue represented by Li1 is a vertical photo queue
  • the photo queue represented by Li2 is a horizontal photo queue
  • the value of i is an integer of 1...k.
  • Step 302 Select a photo wall from a plurality of pre-generated photo walls, and set k source albums for the photo wall.
  • Step 303 Determine the number n of the vertical photo frames in the photo wall and the number m of the horizontal photo frames.
  • the photo wall includes a horizontal photo frame and a vertical photo frame.
  • Step 304 Acquire a photo queue of the k source albums generated in advance.
  • Step 305 According to the update cycle of the photo wall, select n vertical photos from k vertical photo queues of k source albums, and select m horizontal photos from k horizontal photo queues, and then n vertical plates. The photo is displayed in n vertical photo frames, and m horizontal photo photos are displayed in m horizontal photo frames.
  • each source album includes two photo queues. Therefore, k source albums have a total of k vertical photo queues (L11, L21, ... Lk1), and k source albums have a total of k horizontal photo photos. Queue (L12, L22, ... Lk2).
  • k source albums have a total of k vertical photo queues (L11, L21, ... Lk1), and k source albums have a total of k horizontal photo photos. Queue (L12, L22, ... Lk2).
  • FIG. 7 is a schematic diagram of a process for selecting a photo to be displayed according to Embodiment 3 of the present invention.
  • the source album 1 has two photo queues L11 and L12
  • the source album 2 has two photo queues.
  • the photo wall has a total of n vertical photo frames and m horizontal photo frames.
  • Each round selects n vertical photos from the vertical photo queues L11 and L21, and each round selects m from the horizontal photo queues L12 and L22. Zhang Heng version of the photo.
  • Step 306 When the update period arrives, return to step 305.
  • FIG. 8 is a schematic structural diagram of a portable electronic device including a display screen according to Embodiment 4 of the present invention. As shown in FIG. 8 , the portable electronic device provided in this embodiment includes a display module 11 and a processing module 12 .
  • the display module 11 is configured to display a photo wall on the display screen, where the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than one;
  • the processing module 12 is configured to determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
  • the processing module 12 is further configured to determine that the photo to be displayed is a vertical photo, and the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall.
  • the photo type of the photo to be displayed is determined by the portable electronic device in advance or determined in real time, and the photo type includes: a horizontal photo and a vertical photo.
  • the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all photos of one source album of the k source albums, and the k source albums are provided for the photo wall Photograph, the k is an integer not less than 1.
  • the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all the photos of the k source albums, wherein the k source albums provide photos for the photo wall, k is an integer not less than one.
  • the photo type of the photo to be displayed is determined by the portable electronic device according to the type identifier of the photo to be displayed.
  • the processing module 12 is further configured to: obtain a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums provide photos for the photo wall, the K An integer that is not less than one; a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo is calculated; and the photo wall is determined according to the first ratio.
  • the processing module 12 is further configured to: periodically acquire the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; and if the photo of the horizontal photo in the k source albums The total number of photos of the total number and/or the vertical photo changes, calculating a second ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; adjusting the photo wall according to the second ratio The number of frames in the photo frame or the type of photo frame.
  • the portable electronic device provided in this embodiment can be used to perform the methods in the first embodiment to the third embodiment.
  • the specific implementation and technical effects are similar, and details are not described herein again.
  • FIG. 9 is a portable electronic device according to Embodiment 5 of the present invention.
  • the portable electronic device 200 provided in this embodiment includes: a display 21, one or more processors 22, a memory 23, and one or more Program 24; wherein display 21 includes a touch-sensitive surface and display a screen, the one or more programs 24 being stored in the memory 23 and configured to be executed by the one or more processors 22, the one or more programs 24 being included for performing the following Method instructions:
  • the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1;
  • the photo to be displayed is a horizontal photo, and displaying the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
  • Determining that the photo to be displayed is a vertical photo, and displaying the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
  • the photo type of the photo to be displayed is determined by a portable electronic device or determined in real time, and the photo type includes: a horizontal photo and a vertical photo.
  • the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all photos of one source album of the k source albums, and the k source albums are provided for the photo wall Photograph, the k is an integer not less than 1.
  • the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all the photos of the k source albums, wherein the k source albums provide photos for the photo wall, k is an integer not less than one.
  • the photo type of the photo to be displayed is determined by the portable electronic device according to the type identifier of the photo to be displayed.
  • the method further includes: obtaining a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums being The photo wall provides a photo, the k is an integer not less than 1; a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo is calculated; determining according to the first ratio The photo wall.
  • the method further includes: periodically acquiring the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; if the k source albums are in the horizontal version a total number of photos of the photo and/or a total number of photos of the vertical photo, a second ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo is calculated; and the second ratio is adjusted according to the second ratio The number of frames in the photo wall or the type of photo frame.
  • the portable electronic device provided in this embodiment can be used to perform the first embodiment to the third embodiment.
  • the method, the specific implementation method and the technical effect are similar, and will not be described again here.
  • Embodiment 6 of the present invention provides a computer readable storage medium for storing one or more programs, wherein the one or more programs include instructions when the one or more instructions are included in a display and a plurality of The portable electronic device of the application, when executed, causes the portable electronic device to perform the methods of Embodiments 1 through 3, the display including a touch-sensitive surface and a display screen.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

A method and device for displaying a photo. The method comprises: a portable electronic device displaying a photo wall on a display screen, wherein the photo wall comprises m landscape photo frames and n portrait photo frames; then determining the type of a photo to be displayed, and if the photo to be displayed is a landscape photo, displaying the photo to be displayed in one photo frame of the m landscape photo frames on the photo wall; and if the photo to be displayed is a portrait photo, displaying the photo to be displayed in one photo frame of the n portrait photo frames on the photo wall. In the method, by determining the type of a photo to be displayed, a portrait photo can be displayed in a portrait photo frame and a landscape photo is displayed in a landscape photo frame, so that it can be ensured that each photo is displayed to a user with the best effect.

Description

一种显示照片的方法及设备Method and device for displaying photos 技术领域Technical field
本发明实施例涉及终端技术,尤其涉及一种显示照片的方法及设备。The embodiments of the present invention relate to terminal technologies, and in particular, to a method and a device for displaying photos.
背景技术Background technique
随着手机的普及,每个人的手机中都存储有大量自己喜欢的照片,用户可以将自己喜欢的照片显示在手机桌面上。例如,在安卓(Android)手机的桌面上用户通过双指捏合触摸屏,可以看到“窗口小工具”选项,该窗口小工具中有一个图库微件(英文叫法为gallery widget)工具,用户可以选择一个或多个图库微件添加到桌面上,并为每个图库微件选择相应的源相册,然后各图库微件就会对相应源相册中的照片进行周期性地循环显示。With the popularity of mobile phones, each person's mobile phone stores a large number of photos that they like, and users can display their favorite photos on the mobile phone desktop. For example, on the desktop of an Android mobile phone, the user can pinch the touch screen by two fingers, and the "window widget" option can be seen. The widget has a gallery widget (called "gallery widget" in English), and the user can Select one or more gallery widgets to add to the desktop, and select the appropriate source album for each gallery widget, and each gallery widget will periodically cycle through the photos in the corresponding source album.
但这个功能目前还存在一些瑕疵,导致用户体验不佳,例如:由于图库微件的尺寸是固定大小的(虽然长按可以调整大小,但调整完之后就又是固定的尺寸了),对于手机拍摄的横版照片(手机在横版状态下拍摄的照片)和竖版照片(手机在竖屏状态下拍摄的照片)无法进行自适应的显示,例如,将竖版照片显示在横版或正方形尺寸的图库微件中,会使得照片中的人物会被“截头”或者“遮脸”。目前业界有一款叫做“Photo Wall FX Live Wallpaper”的应用(Application,简称App),可以在手机桌面上显示照片墙,一张照片墙中可以同时显示多个照片,该APP也存在同样的问题,在显示照片时没有考虑照片的横版照片和竖版照片,导致用户体验不佳。However, there are still some flaws in this function, resulting in poor user experience, for example: because the size of the library widget is fixed size (although long press can be resized, but after adjustment is fixed size), for mobile phones The horizontal photo taken (the photo taken with the phone in landscape mode) and the vertical photo (the photo taken with the phone in portrait mode) cannot be adaptively displayed, for example, the vertical photo is displayed in landscape or square. In the size of the gallery widget, the characters in the photo will be "cut" or "face". At present, there is an application called "Photo Wall FX Live Wallpaper" (Application, referred to as App), which can display photo wall on the mobile phone desktop. Multiple photos can be displayed simultaneously in one photo wall. The APP also has the same problem. The horizontal and vertical photos of the photo were not taken into account when displaying the photo, resulting in a poor user experience.
发明内容Summary of the invention
本发明实施例提供一种显示照片的方法及设备,能够根据待显示照片类型,将横版照片显示在横版相框中,将竖版照片显示在竖版相框中,从而提高了用户体验。The embodiment of the invention provides a method and a device for displaying a photo, which can display the horizontal photo in the horizontal photo frame according to the type of the photo to be displayed, and display the vertical photo in the vertical photo frame, thereby improving the user experience.
第一方面提供一种显示照片的方法,用于包括显示器和多个应用程序的 便携式电子设备,其中,所述显示器包括触敏表面和显示屏,所述方法包括:A first aspect provides a method of displaying a photo for use in a display and a plurality of applications A portable electronic device, wherein the display comprises a touch-sensitive surface and a display screen, the method comprising:
在所述显示屏上显示照片墙,所述照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数;Displaying a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1;
确定待显示照片是横版照片,将所述待显示照片显示在所述照片墙的m个横版相框中的一个相框中;Determining that the photo to be displayed is a horizontal photo, and displaying the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
确定所述待显示照片是竖版照片,将所述待显示照片显示在所述照片墙的n个竖版相框中的一个相框中。Determining that the photo to be displayed is a vertical photo, and displaying the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
根据第一方面,在第一方面的第一种可能的实现方式中,所述待显示照片的照片类型是由所述便携式电子设备预先确定的或者实时确定的,所述照片类型包括:横版照片和竖版照片。According to the first aspect, in a first possible implementation manner of the first aspect, the photo type of the photo to be displayed is determined by the portable electronic device or determined in real time, and the photo type includes: a horizontal version Photo and vertical photo.
根据第一方面或第一方面的第一种可能的实现方式,在第一方面的第二种可能的实现方式中,所述待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。According to the first aspect or the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the photo to be displayed is from all the photos of one source album of the k source photo albums. a queue in a horizontal photo queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
根据第一方面或第一方面的第一种可能的实现方式,在第一方面的第三种可能的实现方式中,所述待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。According to the first aspect or the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the photo to be displayed is from a horizontal photo of all the photos of the k source albums A queue in a queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
根据第一方面或第一方面的第一种可能的实现方式,在第一方面的第四种可能的实现方式中,所述待显示照片的照片类型是由所述便携式电子设备根据所述待显示照片的类型标识确定的。According to the first aspect or the first possible implementation of the first aspect, in a fourth possible implementation manner of the first aspect, the photo type of the photo to be displayed is determined by the portable electronic device according to the The type of photo displayed is determined by the logo.
根据第一方面,在第一方面的第五种可能的实现方式中,所述在所述显示屏上显示照片墙之前,所述方法还包括:According to a first aspect, in a fifth possible implementation manner of the first aspect, before the displaying a photo wall on the display screen, the method further includes:
获取k个源相册中横版照片的照片总数和竖版照片的照片总数,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数;Obtaining a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums providing photos of the photo wall, the k being an integer not less than 1;
计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值;Calculating a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
根据所述第一比值确定所述照片墙。The photo wall is determined based on the first ratio.
根据第一方面的第五种可能的实现方式,在第一方面的第六种可能的 实现方式中,所述方法还包括:According to a fifth possible implementation of the first aspect, the sixth possible aspect in the first aspect In an implementation manner, the method further includes:
周期性的获取所述k个源相册中横版照片的照片总数和竖版照片的照片总数;Periodically obtaining the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
若所述k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;If the total number of photos of the horizontal photo and/or the total number of photos of the vertical photo in the k source albums is changed, calculate the total number of photos of the horizontal photo in the k source albums and the second total number of photos of the vertical photo ratio;
根据所述第二比值调整所述照片墙中相框的个数或相框的类型。Adjusting the number of photo frames or the type of the photo frame in the photo wall according to the second ratio.
第二方面提供一种包括显示屏的便携式电子设备,包括:A second aspect provides a portable electronic device including a display screen, comprising:
显示模块,用于在该显示屏上显示照片墙,所述照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数;a display module, configured to display a photo wall on the display screen, the photo wall includes m horizontal photo frames, n vertical photo frames, and m and n are integers not less than one;
处理模块,用于确定待显示照片是横版照片,将所述待显示照片显示在所述照片墙的m个横版相框中的一个相框中;a processing module, configured to determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
所述处理模块还用于确定所述待显示照片是竖版照片,将所述待显示照片显示在所述照片墙的n个竖版相框中的一个相框中。The processing module is further configured to determine that the photo to be displayed is a vertical photo, and display the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
结合第二方面,在第二方面的第一种可能的实现方式中,所述待显示照片的照片类型是由所述便携式电子设备预先确定的或者实时确定的,所述照片类型包括:横版照片和竖版照片。With reference to the second aspect, in a first possible implementation manner of the second aspect, the photo type of the photo to be displayed is determined by the portable electronic device or determined in real time, and the photo type includes: a horizontal version Photo and vertical photo.
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第二种可能的实现方式中,所述待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。With reference to the second aspect or the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the photo to be displayed is from all the photos of one source album of the k source albums. a queue in a horizontal photo queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第三种可能的实现方式中,所述待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。In conjunction with the second aspect or the first possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the photo to be displayed is from a horizontal photo of all the photos of the k source albums A queue in a queue and a vertical photo queue, the k source albums providing photos for the photo wall, the k being an integer not less than one.
结合第二方面或第二方面的第一种可能的实现方式,在第二方面的第四种可能的实现方式中,所述待显示照片的照片类型是由所述便携式电子设备根据所述待显示照片的类型标识确定的。With reference to the second aspect, or the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the photo type of the photo to be displayed is determined by the portable electronic device according to the The type of photo displayed is determined by the logo.
结合第二方面,在第二方面的第五种可能的实现方式中,所述处理模块还用于: In conjunction with the second aspect, in a fifth possible implementation manner of the second aspect, the processing module is further configured to:
获取k个源相册中横版照片的照片总数和竖版照片的照片总数,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数;Obtaining a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums providing photos of the photo wall, the k being an integer not less than 1;
计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值;Calculating a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
根据所述第一比值确定所述照片墙。The photo wall is determined based on the first ratio.
结合第二方面的第五种可能的实现方式,在第二方面的第六种可能的实现方式中,所述处理模块还用于:In conjunction with the fifth possible implementation of the second aspect, in a sixth possible implementation of the second aspect, the processing module is further configured to:
周期性的获取所述k个源相册中横版照片的照片总数和竖版照片的照片总数;Periodically obtaining the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
若所述k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;If the total number of photos of the horizontal photo and/or the total number of photos of the vertical photo in the k source albums is changed, calculate the total number of photos of the horizontal photo in the k source albums and the second total number of photos of the vertical photo ratio;
根据所述第二比值调整所述照片墙中相框的个数或相框的类型。Adjusting the number of photo frames or the type of the photo frame in the photo wall according to the second ratio.
第三方面提供一种便携式电子设备,包括:显示器、一个或多个处理器、存储器、一个或多个程序;其中,所述显示器包括触敏表面和显示屏,所述一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序包括用于执行如第一方面以及第一方面的第一种至第六种可能的实现方式提供的任一项所述的方法的指令。A third aspect provides a portable electronic device comprising: a display, one or more processors, a memory, one or more programs; wherein the display comprises a touch-sensitive surface and a display screen, the one or more programs being Stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising first to sixth possibilities for performing the first aspect and the first aspect An instruction to provide the method of any of the methods described.
第四方面提供一种计算机可读存储介质,用于存储一个或多个程序,其中,所述一个或多个程序包括指令,当所述指令被包括显示器和多个应用程序的便携式电子设备执行时使得所述便携式电子设备执行如第一方面以及第一方面的第一种至第六种可能的实现方式提供的任一项所述方法,其中,所述显示器包括触敏表面和显示屏。A fourth aspect provides a computer readable storage medium for storing one or more programs, wherein the one or more programs include instructions that are executed when a portable electronic device includes a display and a plurality of applications The portable electronic device of any one of the first to sixth possible implementations of the first aspect, wherein the display comprises a touch-sensitive surface and a display screen.
本发明实施例提供的显示照片的方法及设备,便携式电子设备在显示屏上显示照片墙,照片墙包括m个横版相框n个竖版相框,然后,确定待显示照片的类型,若待显示照片是横版照片,则将待显示照片显示在照片墙的m个横版相框中的一个相框中;若待显示照片是竖版照片,则将待显示照片显示在照片墙的n个竖版相框中的一个相框中。所述方法中,通过确定待显示照片的类型,能够将竖版照片显示在竖版相框中,将横版照片显示在横版相框中,从而可以保证每张照片都以最佳的效果显示给用户。 The method and device for displaying a photo according to an embodiment of the present invention, the portable electronic device displays a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and then determines the type of the photo to be displayed, if to be displayed If the photo is a horizontal photo, the photo to be displayed is displayed in one of the m horizontal photo frames of the photo wall; if the photo to be displayed is a vertical photo, the photo to be displayed is displayed in the n vertical version of the photo wall In a photo frame in the photo frame. In the method, by determining the type of the photo to be displayed, the vertical photo can be displayed in the vertical photo frame, and the horizontal photo can be displayed in the horizontal photo frame, thereby ensuring that each photo is displayed with the best effect. user.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本发明实施例一提供的显示照片的方法的流程图;1 is a flowchart of a method for displaying a photo according to Embodiment 1 of the present invention;
图2为照片墙的一种示意图;Figure 2 is a schematic view of a photo wall;
图3为现有技术中照片的显示效果;3 is a display effect of a photograph in the prior art;
图4为本发明实施例提供的方法显示的照片的显示效果;4 is a display effect of a photo displayed by the method according to an embodiment of the present invention;
图5为本发明实施例二提供的照片墙的生成方法的流程图;FIG. 5 is a flowchart of a method for generating a photo wall according to Embodiment 2 of the present invention; FIG.
图6为本发明实施例三提供的动态显示照片的方法的流程图;6 is a flowchart of a method for dynamically displaying a photo according to Embodiment 3 of the present invention;
图7为本发明实施例三提供的选择待显示照片的过程示意图;FIG. 7 is a schematic diagram of a process for selecting a photo to be displayed according to Embodiment 3 of the present invention; FIG.
图8为本发明实施例四提供的一种便携式电子设备的结构示意图;FIG. 8 is a schematic structural diagram of a portable electronic device according to Embodiment 4 of the present invention; FIG.
图9为本发明实施例五提供的一种便携式电子设备。FIG. 9 is a portable electronic device according to Embodiment 5 of the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本发明各实施例提供的方法用于包括显示器和多个应用程序的便携式电子设备,该便携式电子设备包括但不限于智能手机、平板电脑、个人数字助理(英文全称:Personal Digital Assistant,缩写:PDA)等,其中,该显示器包括触敏表面和显示屏,具体可以通过上述便携式电子设备中具有处理功能的模块或芯片执行指令以实现本发明各实施例的方法。The method provided by the embodiments of the present invention is applied to a portable electronic device including a display and a plurality of applications, including but not limited to a smart phone, a tablet computer, and a personal digital assistant (English full name: Personal Digital Assistant, abbreviation: PDA) And the like, wherein the display comprises a touch-sensitive surface and a display screen, and in particular, the method of the embodiments of the present invention can be implemented by executing a command by a module or chip having a processing function in the portable electronic device described above.
图1为本发明实施例一提供的显示照片的方法的流程图,如图1所示,本实施例提供的方法可以包括以下步骤: FIG. 1 is a flowchart of a method for displaying a photo according to Embodiment 1 of the present invention. As shown in FIG. 1 , the method provided in this embodiment may include the following steps:
需要说明的是:步骤101至步骤103的执行主体为包括显示器和多个应用程序的便携式电子设备。It should be noted that the execution body of steps 101 to 103 is a portable electronic device including a display and a plurality of applications.
步骤101、在显示屏上显示照片墙,照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数。Step 101: Display a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1.
便携式电子设备中保存有预先生成的多个照片墙,该多个照片墙可以是便携式电子设备自带的照片墙,也可以是用户根据自己的爱好设计并添加到便携式电子设备中的。每个照片墙中可以包括多个相框,每个相框用于显示一张照片,各照片墙中包括的相框的个数可以相同也可以不同,且各照片墙中包括的相框类型可以相同也可以不同。本实施例中,每个照片墙中包括以下两种相框类型:横版相框和竖版相框。其中,横版相框是指宽高比大于或等于1的相框,例如宽高比为16:9、4:3、3:2等,竖版相框是指宽高比小于1的相框,例如宽高比为9:16、3:4、2:3等。横版相框用于显示横版照片,竖版相框用于显示竖版照片。本实施例中,横版照片是指宽高比大于或等于1的照片,例如宽高比为16:9、4:3、3:2等,竖版照片是指宽高比小于1的照片,例如宽高比为9:16、3:4、2:3等。The pre-generated photo wall is stored in the portable electronic device, and the plurality of photo walls may be a photo wall that is provided by the portable electronic device, or may be designed and added to the portable electronic device according to a user's preference. Each photo wall may include a plurality of photo frames, and each photo frame is used to display a photo. The number of photo frames included in each photo wall may be the same or different, and the photo frames included in each photo wall may be the same type. different. In this embodiment, each photo wall includes the following two types of photo frames: a horizontal photo frame and a vertical photo frame. The horizontal photo frame refers to a photo frame with an aspect ratio greater than or equal to 1, for example, an aspect ratio of 16:9, 4:3, 3:2, etc., and a vertical photo frame refers to a photo frame having an aspect ratio of less than 1, such as a width. The height ratio is 9:16, 3:4, 2:3, etc. Horizontal photo frames are used to display landscape photos, and vertical photo frames are used to display vertical photos. In this embodiment, the horizontal photo refers to a photo having an aspect ratio greater than or equal to 1, for example, an aspect ratio of 16:9, 4:3, 3:2, etc., and a vertical photo refers to a photo having an aspect ratio of less than 1. For example, the aspect ratio is 9:16, 3:4, 2:3, and the like.
图2为照片墙的一种示意图,如图2所示,图2中共有4个照片墙,其中,照片墙A、B、C和D中分别有2种类型的相框:横版相框和竖版相框,照片墙A、B中分别有4个相框,可以显示4张照片,照片墙C中有5个相框,照片墙D中有6个相框。本实施例中,照片墙为可编辑的照片墙,用户可以改变照片墙中相框的个数、类型、大小和位置。2 is a schematic view of a photo wall. As shown in FIG. 2, there are four photo walls in FIG. 2, wherein there are two types of photo frames in photo walls A, B, C, and D: horizontal photo frames and vertical frames. The photo frame, photo wall A and B respectively have 4 photo frames, which can display 4 photos, 5 photo frames in photo wall C, and 6 photo frames in photo wall D. In this embodiment, the photo wall is an editable photo wall, and the user can change the number, type, size and position of the photo frame in the photo wall.
本实施例中,可以在安卓系统的“窗口小工具”中新增一张“照片墙widget”选项,照片墙widget中包括该多个照片墙,用户可以从照片墙widget中选择一个当前需要显示的照片墙。在选择需要显示的照片墙后,为选择的照片墙设置k个源相册,k个源相册为照片墙提供照片,k为不小于1的整数。In this embodiment, a “photo wall widget” option may be added to the “window widget” of the Android system, and the photo wall widget includes the plurality of photo walls, and the user may select a current desired display from the photo wall widget. Photo wall. After selecting the photo wall to be displayed, k source albums are set for the selected photo wall, k source albums provide photos for the photo wall, and k is an integer not less than 1.
步骤102、确定待显示照片是横版照片,将待显示照片显示在照片墙的m个横版相框中的一个相框中。Step 102: Determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall.
步骤103、确定待显示照片是竖版照片,将待显示照片显示在照片墙的n个竖版相框中的一个相框中。Step 103: Determine that the photo to be displayed is a vertical photo, and display the photo to be displayed in one of the n vertical photo frames of the photo wall.
k个源相册中每个相册的照片类型包括横版照片和/或竖版照片,即有 些源相册可能只包括横版照片,有些源相册可能只包括竖版照片,有些源相册可能即包括竖版照片又包括横版照片。待显示照片来自k个源相册中的一个源相册,待显示照片的照片类型是由便携式电子设备预先确定的或者实时确定的。The photo types of each of the k source albums include horizontal photos and/or vertical photos, ie Some source albums may only include horizontal photos, some source albums may only include vertical photos, and some source albums may include vertical photos and horizontal photos. The photo to be displayed is from one of the k source albums, and the photo type of the photo to be displayed is predetermined by the portable electronic device or determined in real time.
便携式电子设备具体可以通过如下几种方式确定待显示照片是横版照片还是竖版照片:The portable electronic device can determine whether the photo to be displayed is a horizontal photo or a vertical photo in the following ways:
第一种方式:待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,其中,每个源相册都包括横版照片队列和竖版照片队列,每个源相册的横版照片队列由该源相册的所有横版照片构成,每个源相册的竖版照片队列由该相册的所有竖版照片构成。The first way: the photo to be displayed is from a horizontal photo queue and a vertical photo queue in all photos of one source album of the k source albums, wherein each source album includes a horizontal photo queue and In the vertical photo queue, the horizontal photo queue of each source album is composed of all horizontal photos of the source album, and the vertical photo queue of each source album is composed of all vertical photos of the album.
需要说明的是,本实施例以及下述各实施例中,横版照片队列和竖版照片队列只是对照片进行了逻辑上的划分,照片还是存储在源相册中,并没有存储到照片队列中,照片队列中只是存储了照片的索引。并且照片队列包括但不限于:链表、数组、队列、线性表、堆栈、树、图等计算机领域内的常用数据结构。It should be noted that, in this embodiment and the following embodiments, the horizontal photo queue and the vertical photo queue only logically divide the photos, and the photos are still stored in the source album, and are not stored in the photo queue. In the photo queue, only the index of the photo is stored. And photo queues include, but are not limited to, common data structures in computer fields such as linked lists, arrays, queues, linear tables, stacks, trees, and graphs.
在第一种方式中,首先,获取k个源相册中的每个源相册的横版照片队列和竖版照片队列;然后,从k个源相册的横版照片队列中选择待显示的照片,将待显示的照片显示在照片墙的m个横版相框中的一个相框中;或者,从k个源相册的竖版照片队列中选择待显示的照片,将待显示的照片显示在照片墙的n个竖版相框中的一个相框中。由于横版照片队列中的所有照片都是横版照片,竖版照片队列中的所有照片都是竖版照片,因此,从横版照片队列中选取的一定是横版照片,从竖版照片队列中选取的一定是竖版照片。In the first manner, first, a horizontal photo queue and a vertical photo queue of each of the source albums of the k source albums are acquired; then, the photos to be displayed are selected from the horizontal photo queues of the k source albums. Displaying the photo to be displayed in one of the m horizontal photo frames of the photo wall; or, selecting a photo to be displayed from the vertical photo queue of the k source albums, and displaying the photo to be displayed on the photo wall One of the n vertical photo frames. Since all the photos in the horizontal photo queue are horizontal photos, all the photos in the vertical photo queue are vertical photos, so the horizontal photo queue must be selected from the horizontal photo queue. The selected one must be a vertical photo.
其中,获取照片墙的k个源相册中的每个源相册的照片队列,具体为:预先确定或者实时确定k个源相册中的每张照片的照片类型,照片类型包括:横版照片和竖版照片。对于k个源相册中的第一源相册,根据第一源相册中每种张照片的照片类型,将第一源相册中的横版照片归属到第一源相册的横版照片队列,将第一源相册中的竖版照片归属到第一源相册的竖版照片队列,第一源相册为k个源相册中的任意一个源相册,后续,在显 示照片时,可以直接从横版照片队列和竖版照片队列中选择待显示照片,从横版照片队列中选择的待显示照片即为横版照片,从竖版照片队列中选择的待显示照片即为竖版照片队列,不需要再根据待显示照片的形状确定待显示照片的照片类型。The photo queue of each of the k source albums of the photo wall is obtained by: predetermining or real-time determining the photo type of each photo in the k source albums, the photo types include: horizontal photo and vertical Version photo. For the first source album in the k source albums, according to the photo type of each photo in the first source album, the horizontal photo in the first source album is attributed to the horizontal photo queue of the first source album, The vertical photo in the one source album belongs to the vertical photo queue of the first source photo album, and the first source photo album is any one of the k source photo albums, followed by When the photo is displayed, you can select the photo to be displayed directly from the horizontal photo queue and the vertical photo queue. The photo to be displayed selected from the horizontal photo queue is the horizontal photo, and the photo to be displayed selected from the vertical photo queue. That is, the vertical photo queue does not need to determine the photo type of the photo to be displayed according to the shape of the photo to be displayed.
若每个源相册中的照片类型的确定,以及照片队列的建立是预先进行的,即在用户选择照片墙之前每个源相册中的照片类型以及照片队列的建立已经完成,那么在用户将照片墙添加到便携式电子设备的桌面之后,立刻就可以在照片墙中显示照片。在这种实现方式中,当k个源相册中每保存一张新照片时,便携式电子设备就对该新照片进行形状分析,确定该新照片类型。具体的,若该新照片的宽高比例小于1,则确定该新照片为竖版照片,若该新照片的宽高比例大于或等于1,则确定该新照片为横版照片。然后,将该新照片添加到已有照片队列,或者新建一个照片队列,例如,若该新照片为竖版照片,并且已经建立了竖版照片队列,则将该新照片添加到竖版照片队列,若还没有建立竖版照片队列,则建立竖版照片队列,将该照片添加到新建的竖版照片队列中。If the determination of the photo type in each source album and the establishment of the photo queue are performed in advance, that is, the photo type in each source album and the establishment of the photo queue have been completed before the user selects the photo wall, then the user will take the photo Once the wall is added to the desktop of the portable electronic device, the photo can be displayed in the photo wall immediately. In this implementation, each time a new photo is saved in the k source albums, the portable electronic device performs a shape analysis on the new photo to determine the new photo type. Specifically, if the aspect ratio of the new photo is less than 1, it is determined that the new photo is a vertical photo, and if the aspect ratio of the new photo is greater than or equal to 1, the new photo is determined to be a horizontal photo. Then, add the new photo to an existing photo queue, or create a new photo queue, for example, if the new photo is a vertical photo and a vertical photo queue has been created, add the new photo to the vertical photo queue If a vertical photo queue has not been created, create a vertical photo queue and add the photo to the newly created vertical photo queue.
若每个源相册中的照片类型的确定,以及每个源相册的照片队列的建立是实时进行的,即在用户选择照片墙之后,便携式电子设备才开始对每个源相册中的照片的形状进行分析,确定照片类型,根据照片类型将照片归属到对应的照片队列中。这种方式中,可以在对k个源相册的照片队列都形成之后,才开始在目标照片墙中显示照片,也可以在k个源相册的所有照片队列中的任意一个照片队列的照片个数变为1,就开始显示照片,从照片个数变为1的照片队列中选择待显示的照片;若照片个数变为1的照片队列为横版照片队列,则将待显示的照片显示在照片墙的m个横版相框中的一个相框中;若照片个数变为1的照片队列为竖版照片队列,则将待显示的照片显示在照片墙的n个竖版相框中的一个相框中。If the determination of the photo type in each source album and the creation of the photo queue of each source album are performed in real time, that is, after the user selects the photo wall, the portable electronic device starts to shape the photo in each source album. Analyze to determine the photo type and assign the photo to the corresponding photo queue based on the photo type. In this way, the photo can be displayed in the target photo wall after the photo queues of the k source albums are formed, or the number of photos in any one of the photo queues of the k source albums. When it becomes 1, the photo is displayed, and the photo to be displayed is selected from the photo queue whose number of photos becomes 1. If the photo queue whose number of photos becomes 1 is the horizontal photo queue, the photo to be displayed is displayed in In a photo frame of the m horizontal photo frames of the photo wall; if the photo queue whose photo number becomes 1 is a vertical photo queue, the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall in.
从k个源相册的横版照片队列中选择待显示的照片,具体可以通过以下两种方式:Select the photos to be displayed from the horizontal photo queue of k source albums, which can be done in the following two ways:
(1)假设k个源相册共有M个横版照片队列,则按照M个横版照片队列的顺序,每次从一个照片队列中选择一张待显示照片,直到为照片墙中的m个横版相框都选择待显示照片后,则停止选择照片。 (1) Assuming that there are M horizontal photo queues in k source albums, select one photo to be displayed from one photo queue each time in the order of M horizontal photo queues, until m horizontally in the photo wall When the photo frame is selected to display the photo, the photo is stopped.
(2)假设k个源相册共有M个横版照片队列,则从M个横版照片队列中的一个横版照片队列中为照片墙中的m个横版相框都选择待显示照片;若该横版照片队列中的照片总数大于或等于m,则从该横版照片队列中选择待显示照片;若该横版照片队列中的照片总数小于m,则选择该横版照片队列中的所有照片,并从M个横版照片队列中的其他横版照片队列中选择待显示照片。本实施例中,若每个源相册均包括横版照片队列,则M与k的取值相同,若k个源相册中的部分相册不包括横版照片队列时,则M的取值小于k。(2) Assuming that there are M horizontal photo queues in the k source albums, the photos to be displayed are selected from the m horizontal photo frames in the photo wall of the M horizontal photo queues; If the total number of photos in the horizontal photo queue is greater than or equal to m, the photo to be displayed is selected from the horizontal photo queue; if the total number of photos in the horizontal photo queue is less than m, all the photos in the horizontal photo queue are selected. And select the photos to be displayed from the other horizontal photo queues in the M horizontal photo queue. In this embodiment, if each source album includes a horizontal photo queue, the values of M and k are the same. If some of the k source albums do not include the horizontal photo queue, the value of M is less than k. .
例如,共有2个横版照片队列,需要选择3张待显示的横版照片,若采用方式(1),则先从第一个横版照片队列中选择一张照片,然后,从第二个横版照片队列中选择一张照片,再从第一个横版照片队列中选择一张照片,共选择了三张照片。若采用方式(2),则直接从第一个横版照片队列中选择3张照片,若第一个横版照片队列中的照片总数不够三张,或者,虽然第一个横版照片队列中的照片总数大于三张,但是,大部分照片已经被显示过了,还没有被显示的照片总数小于三张,则从第二个横版照片队列中继续选择照片。For example, there are 2 horizontal photo queues, you need to select 3 horizontal photos to be displayed. If you use the method (1), first select a photo from the first horizontal photo queue, then, from the second Select a photo from the horizontal photo queue and select a photo from the first horizontal photo queue. A total of three photos were selected. If the mode (2) is used, 3 photos are directly selected from the first horizontal photo queue, if the total number of photos in the first horizontal photo queue is not enough, or although the first horizontal photo queue is in the queue The total number of photos is greater than three, but most of the photos have already been displayed, and the total number of photos that have not been displayed is less than three, then continue to select photos from the second horizontal photo queue.
第二种方式,待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列。In the second way, the photo to be displayed is from a horizontal photo queue and a queue in the vertical photo queue formed by all the photos of the k source albums.
首先,获取k个源相册的横版照片队列和竖版照片队列,横版照片队列由k个源相册的所有横版照片构成,竖版照片队列由k个源相册中的所有竖版照片构成。然后,从横版照片队列选择待显示的照片,将待显示的照片显示在照片墙的m个横版相框中的一个相框中;或者,从竖版照片队列选择待显示的照片,将待显示的照片显示在照片墙的n个竖版相框中的一个相框中。First, the horizontal photo queue and the vertical photo queue of k source albums are obtained. The horizontal photo queue is composed of all horizontal photos of k source albums, and the vertical photo queue is composed of all vertical photos in k source albums. . Then, select a photo to be displayed from the horizontal photo queue, and display the photo to be displayed in one of the m horizontal photo frames of the photo wall; or select a photo to be displayed from the vertical photo queue to be displayed The photo is displayed in a photo frame in the n vertical photo frames of the photo wall.
第二种方式和第一种方式的区别在于:第一种方式中需要为每个源相册单独建立一个横版照片队列和一个竖版照片队列,第二种方式中,为k个源相册建立一个横版照片队列和一个竖版照片队列。第二种方式中,便携式电子设备也需要预先确定或者实时确定K个源相册中的每张照片的照片类型,然后,根据k个源相册中的每张照片类型,将k个源相册中的横版照片归属到横版照片队列中,将k个源相册中的竖版照片归属到竖版 照片队列中。The difference between the second method and the first method is that in the first method, a horizontal photo queue and a vertical photo queue need to be separately created for each source album. In the second method, k source albums are created. A horizontal photo queue and a vertical photo queue. In the second mode, the portable electronic device also needs to determine or determine the photo type of each photo in the K source albums in advance, and then, according to each photo type in the k source albums, in the k source albums. The horizontal photo belongs to the horizontal photo queue, and the vertical photos in the k source albums are assigned to the vertical version. In the photo queue.
第三种方式,待显示照片的照片类型是根据待显示照片的类型标识确定的。In the third mode, the photo type of the photo to be displayed is determined according to the type identifier of the photo to be displayed.
与第一种方式和第二种方式不同,第三种方式中不需要建立照片队列,当相框的更新周期到时,从k个源相册选择待显示照片,并获取待显示照片的类型标识,待显示照片的类型标识用于指示待显示照片的类型,待显示照片的类型标识是预先根据待显示照片的类型添加的。在获取到待显示照片的类型标识后,若待显示照片的类型指示待显示照片为横版照片,则将待显示照片显示在照片墙的m个横版相框中的一个相框中;若待显示照片的类型指示待显示照片为竖版照片,则将待显示照片显示在照片墙的n个竖版相框中的一个相框中。Different from the first mode and the second mode, in the third mode, it is not necessary to establish a photo queue. When the update period of the photo frame is reached, the photo to be displayed is selected from the k source albums, and the type identifier of the photo to be displayed is obtained. The type identifier of the photo to be displayed is used to indicate the type of the photo to be displayed, and the type identifier of the photo to be displayed is added in advance according to the type of the photo to be displayed. After obtaining the type identifier of the photo to be displayed, if the type of the photo to be displayed indicates that the photo to be displayed is a horizontal photo, the photo to be displayed is displayed in one of the m horizontal photo frames of the photo wall; The type of the photo indicates that the photo to be displayed is a vertical photo, and the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall.
相应的,便携式电子设备还需要预先确定k个源相册中的每张照片的照片类型;然后,根据k个源相册中的每张照片的照片类型,为k个源相册中的每张照片添加类型标识,其中,照片类型相同的照片的类型标识相同,照片类型不同的照片的类型标识不同。例如,为k个源相册中的所有横版照片添加第一标识,为k个源相册中的所有竖版照片添加第二标识,第一标识和第二标识不相同以便于区分两种类型的照片。Correspondingly, the portable electronic device also needs to predetermine the photo type of each photo in the k source albums; and then, for each photo in the k source albums, according to the photo type of each photo in the k source albums A type identifier in which the type of the photo having the same photo type has the same type identifier, and the type of the photo having a different photo type has a different type identifier. For example, adding a first identifier to all horizontal photos in the k source albums, and adding a second identifier to all the vertical photos in the k source albums, the first identifier and the second identifier being different to facilitate distinguishing between the two types photo.
需要说明的是,本实施例中,照片墙中每个相框的更新周期可以相同,也可以不同。例如,照片墙中所有相框的更新周期都为30秒,那么每隔30秒,会从k个源相册中选择新的照片替换相框中原来显示的照片。或者,m个横版相框的更新周期相同为30秒,n个竖版相框的更新周期相同为20秒,则每隔30秒从k个源相册中选择横版照片替换横版相框中原来显示的照片,每隔20秒从k个源相册中选择竖版照片替换竖版相框中原来显示的照片。或者,所有相框的更新周期互不相同,那么对于每个相框,根据该相框的更新周期从k个源相册中选择新的照片替换该相框中原来显示的照片。或者,某个相框一直不变,而其他相框则具有不同的更新周期。It should be noted that, in this embodiment, the update period of each photo frame in the photo wall may be the same or different. For example, if all photo frames in the photo wall have an update cycle of 30 seconds, then every 30 seconds, a new photo will be selected from the k source albums to replace the original photo displayed in the photo frame. Or, the update period of the m horizontal photo frames is the same as 30 seconds, and the update period of the n vertical photo frames is the same as 20 seconds, then the horizontal photo is selected from the k source albums every 30 seconds to replace the original display in the horizontal photo frame. The photo is taken from the k source albums every 20 seconds to replace the original photo displayed in the vertical photo frame. Alternatively, the update periods of all the photo frames are different from each other, and for each photo frame, a new photo is selected from the k source albums according to the update period of the photo frame to replace the originally displayed photo in the photo frame. Or, a photo frame remains the same, while other photo frames have different update cycles.
当照片墙中每个相框的更新周期相同时,或者,横版相框的更新周期相同,竖版相框的更新周期相同时,在选择一张待显示照片后,可以将待显示照片随机的显示在匹配的相框中任意一个相框中,或者,对各个相框进行编号,按照序号依次显示。例如,共有3个竖版相框,编号依次为1、 2、3,那么在选择第一张竖版照片后,将第一张竖版照片显示在编号为1的竖版相框中,选择第二张竖版照片后,将第二张竖版照片显示在编号为2的竖版相框中。When the update period of each photo frame in the photo wall is the same, or the update period of the horizontal photo frame is the same, when the update period of the vertical photo frame is the same, after selecting a photo to be displayed, the photo to be displayed can be randomly displayed. Match any photo frame in any one of the photo frames, or number each photo frame, and display them sequentially according to the serial number. For example, there are 3 vertical photo frames, numbered sequentially. 2, 3, then after selecting the first vertical photo, the first vertical photo is displayed in the vertical photo frame numbered 1, and after selecting the second vertical photo, the second vertical photo is displayed. In the vertical photo frame numbered 2.
本实施例中,便携式电子设备在显示屏上显示照片墙,照片墙包括m个横版相框和n个竖版相框,然后,确定待显示照片的类型,若待显示照片是横版照片,则将待显示照片显示在照片墙的m个横版相框中的一个相框中;若待显示照片是竖版照片,则将待显示照片显示在照片墙的n个竖版相框中的一个相框中。所述方法中,通过确定待显示照片的类型,能够将竖版照片显示在竖版相框中,将横版照片显示在横版相框中,从而可以保证每张照片都以最佳的效果显示给用户。In this embodiment, the portable electronic device displays a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and then determines the type of the photo to be displayed, and if the photo to be displayed is a horizontal photo, The photo to be displayed is displayed in one of the m horizontal photo frames of the photo wall; if the photo to be displayed is a vertical photo, the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall. In the method, by determining the type of the photo to be displayed, the vertical photo can be displayed in the vertical photo frame, and the horizontal photo can be displayed in the horizontal photo frame, thereby ensuring that each photo is displayed with the best effect. user.
图3为现有技术中照片的显示效果,图4为本发明实施例提供的方法显示的照片的显示效果,对比图3和图4,可以看出现有技术中,照片中将横版照片显示在竖版相框中,或者,将竖版照片显示在横版相框中,会使得显示照片中人物会被“截头”或者“遮脸”,显示效果不好,本实施例的方法可以使竖版照片显示在竖版相框中,将横版照片显示在横版相框中,从而可以保证每张照片都以最佳的效果显示给用户。3 is a display effect of a photo in the prior art, and FIG. 4 is a display effect of a photo displayed by the method according to an embodiment of the present invention. Referring to FIG. 3 and FIG. 4, it can be seen that in the prior art, a photo of a horizontal photo is displayed in the photo. In the vertical photo frame, or display the vertical photo in the horizontal photo frame, the characters in the displayed photo will be "tripped" or "face", and the display effect is not good. The method of the embodiment can make the vertical The photo is displayed in the vertical photo frame, and the horizontal photo is displayed in the horizontal photo frame, so that each photo can be displayed to the user with the best effect.
在实施例一的基础上,本发明实施例二提供一种照片墙的生成方法,图5为本发明实施例二提供的照片墙的生成方法的流程图,如图5所示,本实施例提供的方法可以包括以下步骤:On the basis of the first embodiment, the second embodiment of the present invention provides a method for generating a photo wall, and FIG. 5 is a flowchart of a method for generating a photo wall according to the second embodiment of the present invention. As shown in FIG. The method provided can include the following steps:
需要说明的是:步骤201至步骤203的执行主体为包括显示器和多个应用程序的便携式电子设备。It should be noted that the execution body of steps 201 to 203 is a portable electronic device including a display and a plurality of applications.
步骤201、获取k个源相册中横版照片的照片总数和竖版照片的照片总数,k个源相册为所述照片墙提供照片,k为不小于1的整数。Step 201: Obtain a total number of photos of horizontal photos in the k source albums and a total number of photos of the vertical photos, and k source albums provide photos for the photo wall, and k is an integer not less than 1.
若为每个源相册建立了横版照片队列和竖版照片队列,那么可以直接将k个源相册中的横版照片队列中的照片个数相加得到k个源相册中横版照片的照片总数,将k个源相册中的竖版照片队列中的照片个数相加得到k个源相册中竖版照片的照片总数。若为k个源相册建立了横版照片队列和竖版照片队列,那么横版照片队列中的照片个数即为k个源相册中横版照片的总数,竖版照片队列中的照片个数即为k个源相册中竖版照片的照片总数。电子设备还可以通过其他方式获取k个源相册中横版照片的照片 总数和竖版照片的照片总数,这里只是举例说明。If a horizontal photo queue and a vertical photo queue are created for each source album, then the number of photos in the horizontal photo queue in the k source albums can be directly added to obtain photos of the horizontal photos in the k source albums. The total number of photos in the vertical photo queue in the k source albums is added to obtain the total number of photos of the vertical photos in the k source albums. If a horizontal photo queue and a vertical photo queue are created for k source albums, the number of photos in the horizontal photo queue is the total number of horizontal photos in k source albums, and the number of photos in the vertical photo queue. This is the total number of photos in the vertical photo of the k source albums. Electronic devices can also obtain photos of horizontal photos in k source albums by other means. The total number of photos in the total and vertical photos, just to illustrate.
步骤202、计算k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值。Step 202: Calculate a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo.
假设K个源相册中横版照片的照片总数为k1,竖版照片的照片总数为k2,则第一比值为k1:k2。Assuming that the total number of photos of the horizontal photo in the K source albums is k1 and the total number of photos in the vertical photo is k2, the first ratio is k1:k2.
步骤203、根据第一比值确定照片墙。Step 203: Determine a photo wall according to the first ratio.
假设第一比值为k1:k2,则用照片墙中相框的总数乘以k1/(k1+k2)得到横版相框的个数,用照片墙中相框的总数乘以k2/(k1+k2)得到竖版相框的个数,然后,根据横版相框的个数和竖版相框的个数确定照片墙,具体为确定相框的大小和位置。需要说明的是,若用照片墙中相框的总数乘以k1/(k1+k2)得到的第一结果不是整数,则可以对第一结果取整得到横版相框的个数,同理,用照片墙中相框的总数乘以k2/(k1+k2)得到的第二结果不为整数,则可以对第二结果取整得到竖版相框的个数,或者,用照片墙中的相框总个数减去横版相框的个数得到竖版相框的个数。Assuming the first ratio is k1:k2, multiply the total number of frames in the photo wall by k1/(k1+k2) to get the number of horizontal frames, multiply the total number of frames in the photo wall by k2/(k1+k2) Get the number of vertical photo frames, and then determine the photo wall according to the number of horizontal photo frames and the number of vertical photo frames, specifically to determine the size and position of the photo frame. It should be noted that if the first result obtained by multiplying the total number of photo frames in the photo wall by k1/(k1+k2) is not an integer, the first result can be rounded to obtain the number of horizontal photo frames, and the same reason is used. If the total number of frames in the photo wall multiplied by k2/(k1+k2) is not an integer, the second result can be rounded to obtain the number of vertical photo frames, or the total number of photo frames in the photo wall can be used. The number of horizontal photo frames is subtracted from the number to obtain the number of vertical photo frames.
可选的,本实施例的方法还可以包括以下步骤:周期性的获取k个源相册中横版照片的照片总数和竖版照片的照片总数;若k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,则计算k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;根据第二比值调整照片墙中相框的个数或相框的类型。Optionally, the method in this embodiment may further include the following steps: periodically obtaining the total number of photos of the horizontal photo in the k source albums and the total number of photos in the vertical photo; and the total number of photos in the horizontal photo of the k source albums And/or the total number of photos of the vertical photo changes, calculating a second ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; adjusting the number of photo frames in the photo wall according to the second ratio or The type of photo frame.
例如,k个源相册中原来没有横版照片或者横版照片的数量很少,因此,原来生成照片墙中不包含横版照片,但后来用户逐渐拍摄了一些横版照片,且横版照片的数量超过了预设的横版照片的数量阈值,则此时新的照片墙中应当包含横版相框,则电子设备调整原来照片墙中相框类型和竖版相框的相框。并向用户发送更新提示信息,更新提示可以通过通知消息的方式告知用户,用户点击同意后才会更新。For example, there are no horizontal photos or horizontal photos in the k source albums. Therefore, the original photo wall does not contain horizontal photos, but the user gradually took some horizontal photos and horizontal photos. If the number exceeds the threshold number of preset horizontal photos, then the new photo wall should include a horizontal photo frame, and the electronic device adjusts the photo frame type of the original photo wall and the photo frame of the vertical photo frame. And sending an update prompt message to the user, the update prompt can inform the user by means of the notification message, and the user will update after clicking the consent.
可选的,在确定第一比值之前,还可以包括以下步骤:根据k个源相册中横版照片的照片总数确定横版照片为可用照片类型;根据所述k个源相册中竖版照片的照片总数确定竖版照片为可用照片类型。对于不可用照片类型在计算第一比例关系时不予考虑。Optionally, before determining the first ratio, the method may further include: determining, according to the total number of photos of the horizontal photos in the k source albums, the horizontal photo as the available photo type; according to the vertical photo of the k source albums The total number of photos determines that the vertical photo is the available photo type. The unusable photo type is not considered when calculating the first proportional relationship.
具体可以通过如下两种方式确定照片类型是否为可用照片类型:一种 实现方式中,判断k个源相册中横版照片的照片总数是否大于横版照片的数量阈值;若k个源相册中横版照片的照片总数大于横版照片的数量阈值,则确定横版照片为可用照片类型。然后,判断K个源相册中竖版照片的照片总数是否大于竖版照片的数量阈值;若k个源相册中竖版照片的照片总数大于竖版照片的数量阈值,则确定竖版照片为可用照片类型。例如,横版照片的数量阈值为10,若k个源相册中横版照片的照片总数小于10,则确定横版照片为不可用照片类型。Specifically, the photo type can be determined as the available photo type by the following two methods: In the implementation manner, it is determined whether the total number of photos of the horizontal photo in the k source albums is greater than the threshold value of the horizontal photo; if the total number of photos of the horizontal photo in the k source album is greater than the threshold of the horizontal photo, the horizontal photo is determined The type of photo available. Then, determining whether the total number of photos of the vertical photos in the K source albums is greater than the threshold number of the vertical photos; if the total number of photos of the vertical photos in the k source albums is greater than the threshold number of the vertical photos, determining that the vertical photos are available Photo type. For example, the number threshold of the horizontal photo is 10, and if the total number of photos of the horizontal photo in the k source albums is less than 10, it is determined that the horizontal photo is an unavailable photo type.
另一种实现方式中,计算k个源相册中横版照片的照片总数占k个源相册的照片总数的比值;判断k个源相册中横版照片的照片总数占k个源相册的照片总数的比值是否大于横版照片的比例阈值;若k个源相册中横版照片的照片总数占k个源相册的照片总数的比值大于横版照片的比例阈值,则确定横版照片为可用照片类型。然后,计算k个源相册中竖版照片的照片总数占k个源相册的照片总数的比值;判断k个源相册中竖版照片的照片总数占k个源相册的照片总数的比值是否大于竖版照片的比例阈值;若k个源相册中竖版照片的照片总数占k个源相册的照片总数的比值大于竖版照片的比例阈值,则确定竖版照片为可用照片类型。In another implementation manner, calculating a ratio of the total number of photos of the horizontal photo in the k source albums to the total number of photos of the k source albums; determining the total number of photos of the horizontal photo in the k source albums as the total number of photos of the k source albums Whether the ratio is greater than the ratio threshold of the horizontal photo; if the ratio of the total number of photos of the horizontal photo in the k source album to the total number of photos of the k source album is greater than the ratio threshold of the horizontal photo, it is determined that the horizontal photo is the available photo type . Then, calculating the ratio of the total number of photos of the vertical photo in the k source albums to the total number of photos of the k source albums; determining whether the ratio of the total number of photos of the vertical photo in the k source albums to the total number of photos of the k source albums is greater than the vertical The proportional threshold of the version photo; if the ratio of the total number of photos of the vertical photo in the k source albums to the total number of photos of the k source albums is greater than the ratio threshold of the vertical photo, it is determined that the vertical photo is the available photo type.
例如,横版照片的比例阈值为5%,若k个源相册中横版照片的照片总数占k个源相册的照片总数的比值小于5%,则确定横版照片为不可用照片类型。本实施例中,横版照片的数量阈值和竖版照片的数量阈值可以相同也可以不同,横版照片的比例阈值和竖版照片的比例阈值可以相同也可以不同。For example, the scale threshold of the horizontal photo is 5%. If the total number of photos of the horizontal photo in the k source albums is less than 5% of the total number of photos of the k source albums, it is determined that the horizontal photo is an unavailable photo type. In this embodiment, the threshold value of the horizontal photo and the threshold of the vertical photo may be the same or different, and the proportional threshold of the horizontal photo and the proportional threshold of the vertical photo may be the same or different.
图6为本发明实施例三提供的动态显示照片的方法的流程图,本实施例中,源相册为多个,源相册中的所有照片的照片类型的确定和形状队列的建立为预先进行,如图6所示,本实施例的方法可以包括以下步骤:FIG. 6 is a flowchart of a method for dynamically displaying a photo according to Embodiment 3 of the present invention. In this embodiment, a plurality of source albums are used, and the determination of the photo type and the establishment of the shape queue of all the photos in the source album are performed in advance. As shown in FIG. 6, the method in this embodiment may include the following steps:
需要说明的是:步骤301至步骤306的执行主体为包括显示器和多个应用程序的便携式电子设备。It should be noted that the execution body of steps 301 to 306 is a portable electronic device including a display and a plurality of applications.
步骤301、预先确定k个源相册中的每张照片的照片类型,根据每张照片的照片类型将每张照片归属到每个源相册相应的照片队列中,每个源相册包括两个照片队列:横版照片队列和竖版照片队列。Step 301: Predetermine a photo type of each photo in the k source albums, and assign each photo to a corresponding photo queue of each source album according to the photo type of each photo, where each source album includes two photo queues. : Horizontal photo queues and vertical photo queues.
源相册中每保存一张新的照片时,即对该照片进行形状分析,确定该 照片的照片类型,根据该照片的照片类型创建新的照片队列或将该照片加入已创建的照片队列中。Each time a new photo is saved in the source album, the shape is analyzed and determined. The photo type of the photo, create a new photo queue based on the photo type of the photo, or add the photo to the created photo queue.
假设每个相册都包括横版照片队列和竖版照片队列,则k个源相册的照片队列可以表示为:源相册1的照片队列:L11、L12,源相册2的照片队列:L21、L22,源相册k的照片队列:Lk1、Lk2。其中,Li1表示的照片队列都为竖版照片队列,Li2表示的照片队列都为横版照片队列,i的取值为1……k的整数。Assuming that each album includes a horizontal photo queue and a vertical photo queue, the photo queue of the k source albums can be represented as: photo album of source album 1: L11, L12, photo queue of source album 2: L21, L22, Photo album of source album k: Lk1, Lk2. Among them, the photo queue represented by Li1 is a vertical photo queue, and the photo queue represented by Li2 is a horizontal photo queue, and the value of i is an integer of 1...k.
步骤302、从预先生成的多个照片墙中选择一个照片墙,为照片墙设置k个源相册。Step 302: Select a photo wall from a plurality of pre-generated photo walls, and set k source albums for the photo wall.
步骤303、确定照片墙中竖版相框的数量n、横版相框的数量m。Step 303: Determine the number n of the vertical photo frames in the photo wall and the number m of the horizontal photo frames.
本实施例中,照片墙中包括横版相框和竖版相框。In this embodiment, the photo wall includes a horizontal photo frame and a vertical photo frame.
步骤304、获取预先生成的k个源相册的照片队列。Step 304: Acquire a photo queue of the k source albums generated in advance.
步骤305、按照照片墙的更新周期,从k个源相册的k个竖版照片队列中选择n张竖版照片,从k个横版照片队列中选择m张横版照片,将n张竖版照片显示在n个竖版相框中,将m个横版照片显示在m个横版相框中。Step 305: According to the update cycle of the photo wall, select n vertical photos from k vertical photo queues of k source albums, and select m horizontal photos from k horizontal photo queues, and then n vertical plates. The photo is displayed in n vertical photo frames, and m horizontal photo photos are displayed in m horizontal photo frames.
本实施例中,每个源相册都包括两个个照片队列,因此,k个源相册共有k个竖版照片队列(L11、L21、……Lk1),k个源相册共有k个横版照片队列(L12、L22、……Lk2)。在从各照片队列中选择待显示照片时,可以随机的选择,或者按照一定的顺序选择。然后,将选择的横版照片显示在横版相框中,将选择的竖版照片显示在竖版相框中。In this embodiment, each source album includes two photo queues. Therefore, k source albums have a total of k vertical photo queues (L11, L21, ... Lk1), and k source albums have a total of k horizontal photo photos. Queue (L12, L22, ... Lk2). When selecting a photo to be displayed from each photo queue, it can be randomly selected or selected in a certain order. Then, the selected horizontal photo is displayed in the horizontal photo frame, and the selected vertical photo is displayed in the vertical photo frame.
图7为本发明实施例三提供的选择待显示照片的过程示意图,如图7所示,共有两个源相册,源相册1有两个照片队列L11和L12,源相册2有两个照片队列L21和L22,照片墙共有n个竖版相框和m个横版相框,每轮从竖版照片队列L11和L21中选择n张竖版照片,每轮从横版照片队列L12和L22中选择m张横版照片。FIG. 7 is a schematic diagram of a process for selecting a photo to be displayed according to Embodiment 3 of the present invention. As shown in FIG. 7, there are two source albums, the source album 1 has two photo queues L11 and L12, and the source album 2 has two photo queues. L21 and L22, the photo wall has a total of n vertical photo frames and m horizontal photo frames. Each round selects n vertical photos from the vertical photo queues L11 and L21, and each round selects m from the horizontal photo queues L12 and L22. Zhang Heng version of the photo.
步骤306、更新周期到达时,返回执行步骤305。Step 306: When the update period arrives, return to step 305.
图8为本发明实施例四提供的一种包括显示屏的便携式电子设备的结构示意图,如图8所示,本实施例提供的便携式电子设备包括:显示模块11和处理模块12。 FIG. 8 is a schematic structural diagram of a portable electronic device including a display screen according to Embodiment 4 of the present invention. As shown in FIG. 8 , the portable electronic device provided in this embodiment includes a display module 11 and a processing module 12 .
其中,显示模块11,用于在显示屏上显示照片墙,所述照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数;The display module 11 is configured to display a photo wall on the display screen, where the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than one;
处理模块12,用于确定待显示照片是横版照片,将所述待显示照片显示在所述照片墙的m个横版相框中的一个相框中;The processing module 12 is configured to determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
所述处理模块12还用于确定所述待显示照片是竖版照片,将所述待显示照片显示在所述照片墙的n个竖版相框中的一个相框中。The processing module 12 is further configured to determine that the photo to be displayed is a vertical photo, and the photo to be displayed is displayed in one of the n vertical photo frames of the photo wall.
可选的,所述待显示照片的照片类型是由所述便携式电子设备预先确定的或者实时确定的,所述照片类型包括:横版照片和竖版照片。Optionally, the photo type of the photo to be displayed is determined by the portable electronic device in advance or determined in real time, and the photo type includes: a horizontal photo and a vertical photo.
可选的,所述待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。Optionally, the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all photos of one source album of the k source albums, and the k source albums are provided for the photo wall Photograph, the k is an integer not less than 1.
可选的,所述待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。Optionally, the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all the photos of the k source albums, wherein the k source albums provide photos for the photo wall, k is an integer not less than one.
可选的,所述待显示照片的照片类型是由便携式电子设备根据所述待显示照片的类型标识确定的。Optionally, the photo type of the photo to be displayed is determined by the portable electronic device according to the type identifier of the photo to be displayed.
可选的,所述处理模块12还用于:获取k个源相册中横版照片的照片总数和竖版照片的照片总数,所述k个源相册为所述照片墙提供照片,所述K为不小于1的整数;计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值;根据所述第一比值确定所述照片墙。Optionally, the processing module 12 is further configured to: obtain a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums provide photos for the photo wall, the K An integer that is not less than one; a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo is calculated; and the photo wall is determined according to the first ratio.
进一步的,所述处理模块12还用于:周期性的获取所述k个源相册中横版照片的照片总数和竖版照片的照片总数;若所述k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;根据所述第二比值调整所述照片墙中相框的个数或相框的类型。Further, the processing module 12 is further configured to: periodically acquire the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; and if the photo of the horizontal photo in the k source albums The total number of photos of the total number and/or the vertical photo changes, calculating a second ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; adjusting the photo wall according to the second ratio The number of frames in the photo frame or the type of photo frame.
本实施例提供的便携式电子设备可用于执行实施例一至实施例三的方法,具体实现方式和技术效果类似,这里不再赘述。The portable electronic device provided in this embodiment can be used to perform the methods in the first embodiment to the third embodiment. The specific implementation and technical effects are similar, and details are not described herein again.
图9为本发明实施例五提供的一种便携式电子设备,如图9所示,本实施例提供的便携式电子设备200包括:显示器21、一个或多个处理器22、存储器23、一个或多个程序24;其中,显示器21包括触敏表面和显 示屏,所述一个或多个程序24被存储在所述存储器23中并被配置为由所述一个或多个处理器22执行,所述一个或多个程序24包括用于执行如下所述方法的指令:FIG. 9 is a portable electronic device according to Embodiment 5 of the present invention. As shown in FIG. 9, the portable electronic device 200 provided in this embodiment includes: a display 21, one or more processors 22, a memory 23, and one or more Program 24; wherein display 21 includes a touch-sensitive surface and display a screen, the one or more programs 24 being stored in the memory 23 and configured to be executed by the one or more processors 22, the one or more programs 24 being included for performing the following Method instructions:
在所述显示屏上显示照片墙,所述照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数;Displaying a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1;
确定待显示照片是横版照片,将所述待显示照片显示在所述照片墙的m个横版相框中的一个相框中;Determining that the photo to be displayed is a horizontal photo, and displaying the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
确定所述待显示照片是竖版照片,将所述待显示照片显示在所述照片墙的n个竖版相框中的一个相框中。Determining that the photo to be displayed is a vertical photo, and displaying the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
可选的,所述待显示照片的照片类型是由便携式电子设备预先确定的或者实时确定的,所述照片类型包括:横版照片和竖版照片。Optionally, the photo type of the photo to be displayed is determined by a portable electronic device or determined in real time, and the photo type includes: a horizontal photo and a vertical photo.
可选的,所述待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。Optionally, the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all photos of one source album of the k source albums, and the k source albums are provided for the photo wall Photograph, the k is an integer not less than 1.
可选的,所述待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。Optionally, the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue formed by all the photos of the k source albums, wherein the k source albums provide photos for the photo wall, k is an integer not less than one.
可选的,所述待显示照片的照片类型是由所述便携式电子设备根据所述待显示照片的类型标识确定的。Optionally, the photo type of the photo to be displayed is determined by the portable electronic device according to the type identifier of the photo to be displayed.
可选的,所述在所述显示屏上显示照片墙之前,所述方法还包括:获取k个源相册中横版照片的照片总数和竖版照片的照片总数,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数;计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值;根据所述第一比值确定所述照片墙。Optionally, before the displaying the photo wall on the display screen, the method further includes: obtaining a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums being The photo wall provides a photo, the k is an integer not less than 1; a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo is calculated; determining according to the first ratio The photo wall.
进一步的,在生成照片墙之后,所述方法还包括:周期性的获取所述k个源相册中横版照片的照片总数和竖版照片的照片总数;若所述k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;根据所述第二比值调整所述照片墙中相框的个数或相框的类型。Further, after the photo wall is generated, the method further includes: periodically acquiring the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo; if the k source albums are in the horizontal version a total number of photos of the photo and/or a total number of photos of the vertical photo, a second ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo is calculated; and the second ratio is adjusted according to the second ratio The number of frames in the photo wall or the type of photo frame.
本实施例提供的便携式电子设备可用于执行实施例一至实施例三的 方法,具体实现方式和技术效果类似,这里不再赘述。The portable electronic device provided in this embodiment can be used to perform the first embodiment to the third embodiment. The method, the specific implementation method and the technical effect are similar, and will not be described again here.
本发明实施例六提供一种计算机可读存储介质,用于存储一个或多个程序的,其中,所述一个或多个程序包括指令,当所述一个或多个指令被包括显示器和多个应用程序的便携式电子设备执行时使得所述便携式电子设备执行实施例一至实施例三所述方法,显示器包括触敏表面和显示屏。Embodiment 6 of the present invention provides a computer readable storage medium for storing one or more programs, wherein the one or more programs include instructions when the one or more instructions are included in a display and a plurality of The portable electronic device of the application, when executed, causes the portable electronic device to perform the methods of Embodiments 1 through 3, the display including a touch-sensitive surface and a display screen.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims (16)

  1. 一种显示照片的方法,用于包括显示器和多个应用程序的便携式电子设备,其中,所述显示器包括触敏表面和显示屏,其特征在于,包括:A method of displaying a photo for a portable electronic device comprising a display and a plurality of applications, wherein the display comprises a touch-sensitive surface and a display screen, comprising:
    在所述显示屏上显示照片墙,所述照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数;Displaying a photo wall on the display screen, the photo wall includes m horizontal photo frames and n vertical photo frames, and m and n are integers not less than 1;
    确定待显示照片是横版照片,将所述待显示照片显示在所述照片墙的m个横版相框中的一个相框中;Determining that the photo to be displayed is a horizontal photo, and displaying the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
    确定所述待显示照片是竖版照片,将所述待显示照片显示在所述照片墙的n个竖版相框中的一个相框中。Determining that the photo to be displayed is a vertical photo, and displaying the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
  2. 根据权利要求1所述的方法,其特征在于,所述待显示照片的照片类型是由所述便携式电子设备预先确定的或者实时确定的,所述照片类型包括:横版照片和竖版照片。The method according to claim 1, wherein the photo type of the photo to be displayed is determined by the portable electronic device in advance or determined in real time, and the photo type comprises: a horizontal photo and a vertical photo.
  3. 根据权利要求1或2所述的方法,其特征在于,所述待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。The method according to claim 1 or 2, wherein the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue composed of all the photos of one source album of the k source albums. The k source albums provide photos for the photo wall, and the k is an integer of not less than 1.
  4. 根据权利要求1或2所述的方法,其特征在于,所述待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。The method according to claim 1 or 2, wherein the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue composed of all the photos of the k source albums, the k sources The photo album provides a photo of the photo wall, the k being an integer not less than one.
  5. 根据权利要求1或2所述的方法,其特征在于,所述待显示照片的照片类型是由所述便携式电子设备根据所述待显示照片的类型标识确定的。The method according to claim 1 or 2, wherein the photo type of the photo to be displayed is determined by the portable electronic device according to the type identification of the photo to be displayed.
  6. 根据权利要求1所述的方法,其特征在于,所述在所述显示屏上显示照片墙之前,所述方法还包括:The method according to claim 1, wherein the method further comprises: before the displaying the photo wall on the display screen, the method further comprises:
    获取k个源相册中横版照片的照片总数和竖版照片的照片总数,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数;Obtaining a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums providing photos of the photo wall, the k being an integer not less than 1;
    计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值;Calculating a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
    根据所述第一比值确定所述照片墙。 The photo wall is determined based on the first ratio.
  7. 根据权利要求6所述的方法,其特征在于,所述方法还包括:The method of claim 6 wherein the method further comprises:
    周期性的获取所述k个源相册中横版照片的照片总数和竖版照片的照片总数;Periodically obtaining the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
    若所述k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;If the total number of photos of the horizontal photo and/or the total number of photos of the vertical photo in the k source albums is changed, calculate the total number of photos of the horizontal photo in the k source albums and the second total number of photos of the vertical photo ratio;
    根据所述第二比值调整所述照片墙中相框的个数或相框的类型。Adjusting the number of photo frames or the type of the photo frame in the photo wall according to the second ratio.
  8. 一种包括显示屏的便携式电子设备,其特征在于,包括:A portable electronic device including a display screen, comprising:
    显示模块,用于在所述显示屏上显示照片墙,所述照片墙包括m个横版相框n个竖版相框,m和n为不小于1的整数;a display module, configured to display a photo wall on the display screen, the photo wall includes m horizontal photo frames, n vertical photo frames, and m and n are integers not less than one;
    处理模块,用于确定待显示照片是横版照片,将所述待显示照片显示在所述照片墙的m个横版相框中的一个相框中;a processing module, configured to determine that the photo to be displayed is a horizontal photo, and display the photo to be displayed in one photo frame of the m horizontal photo frames of the photo wall;
    所述处理模块还用于确定所述待显示照片是竖版照片,将所述待显示照片显示在所述照片墙的n个竖版相框中的一个相框中。The processing module is further configured to determine that the photo to be displayed is a vertical photo, and display the photo to be displayed in one photo frame of the n vertical photo frames of the photo wall.
  9. 根据权利要求8所述的便携式电子设备,其特征在于,所述待显示照片的照片类型是由所述便携式电子设备预先确定的或者实时确定的,所述照片类型包括:横版照片和竖版照片。The portable electronic device according to claim 8, wherein the photo type of the photo to be displayed is determined by the portable electronic device in advance or determined in real time, and the photo type comprises: a horizontal photo and a vertical version photo.
  10. 根据权利要求8或9所述的便携式电子设备,其特征在于,所述待显示照片来自于k个源相册中一个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。The portable electronic device according to claim 8 or 9, wherein the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue composed of all the photos of one source album of the k source albums. And the k source albums provide photos for the photo wall, and the k is an integer of not less than 1.
  11. 根据权利要求8或9所述的便携式电子设备,其特征在于,所述待显示照片来自于k个源相册的所有照片构成的横版照片队列和竖版照片队列中的一个队列,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数。The portable electronic device according to claim 8 or 9, wherein the photo to be displayed is from a horizontal photo queue and a queue in a vertical photo queue composed of all the photos of the k source albums, the k The source album provides a photo of the photo wall, and the k is an integer not less than one.
  12. 根据权利要求8或9所述的便携式电子设备,其特征在于,所述待显示照片的照片类型是由所述便携式电子设备根据所述待显示照片的类型标识确定的。The portable electronic device according to claim 8 or 9, wherein the photo type of the photo to be displayed is determined by the portable electronic device according to the type identification of the photo to be displayed.
  13. 根据权利要求8所述的便携式电子设备,其特征在于,所述处理模块还用于: The portable electronic device according to claim 8, wherein the processing module is further configured to:
    获取k个源相册中横版照片的照片总数和竖版照片的照片总数,所述k个源相册为所述照片墙提供照片,所述k为不小于1的整数;Obtaining a total number of photos of the horizontal photo in the k source albums and a total number of photos of the vertical photo, the k source albums providing photos of the photo wall, the k being an integer not less than 1;
    计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第一比值;Calculating a first ratio of the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
    根据所述第一比值确定所述照片墙。The photo wall is determined based on the first ratio.
  14. 根据权利要求13所述的便携式电子设备,其特征在于,所述处理模块还用于:The portable electronic device according to claim 13, wherein the processing module is further configured to:
    周期性的获取所述k个源相册中横版照片的照片总数和竖版照片的照片总数;Periodically obtaining the total number of photos of the horizontal photo in the k source albums and the total number of photos of the vertical photo;
    若所述k个源相册中横版照片的照片总数和/或竖版照片的照片总数发生变化,计算所述k个源相册中横版照片的照片总数和竖版照片的照片总数的第二比值;If the total number of photos of the horizontal photo and/or the total number of photos of the vertical photo in the k source albums is changed, calculate the total number of photos of the horizontal photo in the k source albums and the second total number of photos of the vertical photo ratio;
    根据所述第二比值调整所述照片墙中相框的个数或相框的类型。Adjusting the number of photo frames or the type of the photo frame in the photo wall according to the second ratio.
  15. 一种便携式电子设备,其特征在于,包括:显示器、一个或多个处理器、存储器、一个或多个程序;其中,所述显示器包括触敏表面和显示屏,所述一个或多个程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序包括用于执行如权利要求1至7任一项所述的方法的指令。A portable electronic device, comprising: a display, one or more processors, a memory, one or more programs; wherein the display comprises a touch-sensitive surface and a display screen, the one or more programs being Stored in the memory and configured to be executed by the one or more processors, the one or more programs comprising instructions for performing the method of any one of claims 1 to 7.
  16. 一种计算机可读存储介质,用于存储一个或多个程序的,其特征在于,所述一个或多个程序包括指令,当所述指令被包括显示器和多个应用程序的便携式电子设备执行时使得所述便携式电子设备执行如权利要求1至7任一项所述方法,其中,所述显示器包括触敏表面和显示屏。 A computer readable storage medium for storing one or more programs, wherein the one or more programs include instructions when the instructions are executed by a portable electronic device including a display and a plurality of applications The portable electronic device is caused to perform the method of any one of claims 1 to 7, wherein the display comprises a touch-sensitive surface and a display screen.
PCT/CN2015/080325 2015-05-29 2015-05-29 Method and device for displaying photo WO2016191952A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/080325 WO2016191952A1 (en) 2015-05-29 2015-05-29 Method and device for displaying photo
CN201580023615.9A CN106462600B (en) 2015-05-29 2015-05-29 Method and equipment for displaying photos

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/080325 WO2016191952A1 (en) 2015-05-29 2015-05-29 Method and device for displaying photo

Publications (1)

Publication Number Publication Date
WO2016191952A1 true WO2016191952A1 (en) 2016-12-08

Family

ID=57441636

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/080325 WO2016191952A1 (en) 2015-05-29 2015-05-29 Method and device for displaying photo

Country Status (2)

Country Link
CN (1) CN106462600B (en)
WO (1) WO2016191952A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106462600A (en) * 2015-05-29 2017-02-22 华为技术有限公司 Method and device for displaying photo
CN110609933A (en) * 2019-09-06 2019-12-24 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102473318A (en) * 2009-07-30 2012-05-23 伊斯曼柯达公司 Processing digital templates for image display
US20130311940A1 (en) * 2012-05-15 2013-11-21 Salvadore V. Ragusa System of Organizing Digital Images
CN103577540A (en) * 2013-10-09 2014-02-12 广东欧珀移动通信有限公司 Mobile terminal wallpaper setting method and setting system
CN103678612A (en) * 2013-12-17 2014-03-26 深圳市东信时代信息技术有限公司 Photo-wall distributing device and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1979474A (en) * 2005-12-05 2007-06-13 英业达股份有限公司 Picture-frame producing system and method
US20070285561A1 (en) * 2006-05-26 2007-12-13 Innova Electronics, Inc. Integrated camera/photo display unit
CN101325055B (en) * 2007-06-15 2010-09-01 光宝科技股份有限公司 Method for automatically adjusting location form of digit image frame and digit image frame using the method
JP2010218544A (en) * 2009-02-23 2010-09-30 Canon Inc Display apparatus
CN106462600B (en) * 2015-05-29 2020-09-11 华为技术有限公司 Method and equipment for displaying photos

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102473318A (en) * 2009-07-30 2012-05-23 伊斯曼柯达公司 Processing digital templates for image display
US20130311940A1 (en) * 2012-05-15 2013-11-21 Salvadore V. Ragusa System of Organizing Digital Images
CN103577540A (en) * 2013-10-09 2014-02-12 广东欧珀移动通信有限公司 Mobile terminal wallpaper setting method and setting system
CN103678612A (en) * 2013-12-17 2014-03-26 深圳市东信时代信息技术有限公司 Photo-wall distributing device and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106462600A (en) * 2015-05-29 2017-02-22 华为技术有限公司 Method and device for displaying photo
CN110609933A (en) * 2019-09-06 2019-12-24 深圳市商汤科技有限公司 Image processing method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN106462600B (en) 2020-09-11
CN106462600A (en) 2017-02-22

Similar Documents

Publication Publication Date Title
US10347023B2 (en) Data drawing method and apparatus, terminal, and storage medium
US10795553B2 (en) Systems and methods for intelligent layered interactive programmatic elements for fixed content
US20180011818A1 (en) Webpage Update Method And Apparatus
KR20170037957A (en) Presenting dataset of spreadsheet in form based view
CN109753641B (en) Method and device for changing object position, electronic equipment and storage medium
JP6401855B2 (en) Method and apparatus for setting background of UI control, and terminal
US9990755B2 (en) Apparatus and method for processing animation
KR101932675B1 (en) Terminal, method for contrlling thereof and program written in a recording medium for implementing the method
WO2019052115A1 (en) Application control style customization method and apparatus, and computer-readable storage medium
CN103945127A (en) Photographing method and terminal
WO2016191952A1 (en) Method and device for displaying photo
US20190004686A1 (en) Automatic Layout Engine
US10705788B2 (en) Method and apparatus for controlling audio output
WO2016184171A1 (en) Object selection method and apparatus
WO2017000647A1 (en) Image display method and device
US9525818B2 (en) Automatic tuning of images based on metadata
US20160026613A1 (en) Processing image to identify object for insertion into document
US20160370978A1 (en) System, method, and apparatus for color selection
US20190005694A1 (en) Presentation Collaboration with Various Electronic Devices
TWI651639B (en) Method for optimizing a captured photo or a recorded multi-media and system and electric device therefor
WO2017088282A1 (en) Display method and apparatus for adjusting picture character
JP2018098705A5 (en)
WO2017011680A1 (en) Device and method for processing data
EP3474234A1 (en) Animation generation method and apparatus
CN113377380B (en) User interface component deployment method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15893615

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15893615

Country of ref document: EP

Kind code of ref document: A1