Photo

class pyrogram.raw.types.Photo

Photo

Constructor of Photo.

Details:
  • Layer: 227

  • ID: FB197A65

Parameters:
  • id (int 64-bit) – ID

  • access_hash (int 64-bit) – Access hash

  • file_reference (bytes) – file reference

  • date (int 32-bit) – Date of upload

  • sizes (List of PhotoSize) – Available sizes for download

  • dc_id (int 32-bit) – DC ID to use for download

  • has_stickers (bool, optional) – Whether the photo has mask stickers attached to it

  • video_sizes (List of VideoSize, optional) – For animated profiles, the MPEG4 videos

TL Schema

photo#fb197a65
flags:#
has_stickers:flags.0?true
id:long
access_hash:long
file_reference:bytes
date:int
sizes:Vector<PhotoSize>
video_sizes:flags.1?Vector<VideoSize>
dc_id:int

= Photo

Parameter Tree

Photo
├── has_stickers → true (optional)
├── id → long
├── access_hash → long
├── file_reference → bytes
├── date → int
├── sizes → Vector < PhotoSize >
│ ├── PhotoSizeEmpty
│ │ └── type → string
│ ├── PhotoSize
│ │ ├── type → string
│ │ ├── w → int
│ │ ├── h → int
│ │ └── size → int
│ ├── PhotoCachedSize
│ │ ├── type → string
│ │ ├── w → int
│ │ ├── h → int
│ │ └── bytes → bytes
│ ├── PhotoStrippedSize
│ │ ├── type → string
│ │ └── bytes → bytes
│ ├── PhotoSizeProgressive
│ │ ├── type → string
│ │ ├── w → int
│ │ ├── h → int
│ │ └── sizes → Vector < int >
│ └── PhotoPathSize
│ ├── type → string
│ └── bytes → bytes
├── video_sizes → Vector < VideoSize > (optional)
│ ├── VideoSize
│ │ ├── type → string
│ │ ├── w → int
│ │ ├── h → int
│ │ ├── size → int
│ │ └── video_start_ts → double (optional)
│ ├── VideoSizeEmojiMarkup
│ │ ├── emoji_id → long
│ │ └── background_colors → Vector < int >
│ ├── stickerset → InputStickerSet
│ │ ├── InputStickerSetEmpty
│ │ ├── InputStickerSetID
│ │ │ ├── id → long
│ │ │ └── access_hash → long
│ │ ├── InputStickerSetShortName
│ │ │ └── short_name → string
│ │ ├── InputStickerSetDice
│ │ │ └── emoticon → string
│ │ ├── InputStickerSetPremiumGifts
│ │ └── InputStickerSetTonGifts
│ ├── sticker_id → long
│ └── background_colors → Vector < int >
└── dc_id → int

Example

Photo(
    id=0,
    access_hash=0,
    file_reference=b"data",
    date=0,
    sizes=[
            PhotoSizeEmpty(type="text")
        ],
    dc_id=0,
)