writeIconCroppedIfFlipbook
Writes the source PNG to dest. If the source is a vertical flipbook (height >width), only the top width x width frame is written. Otherwise the file is copied verbatim (faster, preserves any extra PNG metadata the source carries).
Java packs encode item-icon animation by stacking N frames vertically and pairing the PNG with a sibling .png.mcmeta. Bedrock's animation pipeline for item icons is non-existent (Bedrock flipbook_textures.json is documented for blocks/terrain only, see Microsoft Learn and wiki.bedrock.dev "Block Texture Animation"). A non-square icon shows up squished in the Bedrock inventory, so cropping to frame 0 is the visible-icon fallback.