{"action":"opened","issue":{"url":"https://api.github.com/repos/nokiatech/heif/issues/50","repository_url":"https://api.github.com/repos/nokiatech/heif","labels_url":"https://api.github.com/repos/nokiatech/heif/issues/50/labels{/name}","comments_url":"https://api.github.com/repos/nokiatech/heif/issues/50/comments","events_url":"https://api.github.com/repos/nokiatech/heif/issues/50/events","html_url":"https://github.com/nokiatech/heif/issues/50","id":314037383,"number":50,"title":"A problem about iPhone heic","user":{"login":"crb912","id":20267290,"avatar_url":"https://avatars0.githubusercontent.com/u/20267290?v=4","gravatar_id":"","url":"https://api.github.com/users/crb912","html_url":"https://github.com/crb912","followers_url":"https://api.github.com/users/crb912/followers","following_url":"https://api.github.com/users/crb912/following{/other_user}","gists_url":"https://api.github.com/users/crb912/gists{/gist_id}","starred_url":"https://api.github.com/users/crb912/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crb912/subscriptions","organizations_url":"https://api.github.com/users/crb912/orgs","repos_url":"https://api.github.com/users/crb912/repos","events_url":"https://api.github.com/users/crb912/events{/privacy}","received_events_url":"https://api.github.com/users/crb912/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-13T09:38:03Z","updated_at":"2018-04-13T09:38:03Z","closed_at":null,"author_association":"NONE","body":"Dear Nokia Developer,\r\nI know a typical iPhone heic picture has 48 tiles, and I extract all each tile into H.265 bitstream successful. Then I use ffmpeg convert  them to png，I get all 48 still tiles picture finally. \r\nBut it's not I wanted. I try to put all decoder tile into one memory buffer, just converting one times get the complete  png picture. Because I think maybe I could get a picture, not 48 tile. But I don't know how to set  the  HEVC NAL Uint at the beganing of memory buffer.  What should I do? Or the mathod cannot make it?\r\nMy part code\r\n```C++\r\nArray<ImageId> gridIds;\r\nGrid gridData;\r\nArray<ImageId> tileItemIds;\r\nif(reader->getItem(gridIds[0].get(), gridData) == ErrorCode::OK)\r\n{\r\n    tileItemIds = gridData.imageIds;\r\n    if(reader->getItem(gridIds[0].get(), gridData) == ErrorCode::OK)\r\n        {\r\n            tileItemIds = gridData.imageIds; // 48 tiles\r\n            \r\n            // Calculate size of parameter sets, but do not copy the data yet.\r\n            size_t parameterSize = 0;\r\n            DecoderConfiguration decodeConf;\r\n             if(reader->getDecoderParameterSets(tileItemIds[0], decodeConf) == ErrorCode::OK)       \r\n             // I konw the decodeConf is not I want \r\n            {\r\n                for (auto& config : decodeConf.decoderSpecificInfo)\r\n                {parameterSize += config.decSpecInfoData.size;}\r\n            }\r\n            \r\n            //  Copy (worong)parameter data to the beginning of the buffer.\r\n            uint64_t itemSize(0);\r\n            size_t offset = 0;\r\n            for (const auto& config : decodeConf.decoderSpecificInfo)\r\n            {\r\n                memcpy(memoryBuffer + offset, config.decSpecInfoData.begin(), config.decSpecInfoData.size);\r\n                offset += config.decSpecInfoData.size;\r\n            }\r\n            itemSize = memoryBufferSize - static_cast<uint32_t>(parameterSize);\r\n            \r\n            // Copy all tiles data to the buffer\r\n            size_t tileSize = 0;\r\n            for (unsigned int i = 0; i < tileItemIds.size; i++)\r\n            {\r\n\r\n                if (reader->getItemData(tileItemIds[i].get(), &memoryBuffer[parameterSize+tileSize], itemSize) == ErrorCode::OK)\r\n                {\r\n                    cout << \"Get the tile: \" << i << endl;\r\n                    tileSize += itemSize;\r\n                    itemSize = memoryBufferSize - parameterSize - tileSize;\r\n                }\r\n                else{cout << \"Get Image Data error!\" << endl;}\r\n                \r\n                memoryBufferSize = static_cast<uint32_t>(parameterSize) + tileSize;\r\n                \r\n                ofstream outfile(file_name, ofstream::binary);\r\n                outfile.write(memoryBuffer, memoryBufferSize);\r\n            }"}}
{"actor":{"display_login":"crb912"}}