{"action":"created","issue":{"url":"https://api.github.com/repos/pleonex/tinke/issues/8","labels_url":"https://api.github.com/repos/pleonex/tinke/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/pleonex/tinke/issues/8/comments","events_url":"https://api.github.com/repos/pleonex/tinke/issues/8/events","html_url":"https://github.com/pleonex/tinke/issues/8","id":78928445,"number":8,"title":"RawImage NOT Writing last segment from orig_data","user":{"login":"MetLob","id":12542905,"avatar_url":"https://avatars.githubusercontent.com/u/12542905?v=3","gravatar_id":"","url":"https://api.github.com/users/MetLob","html_url":"https://github.com/MetLob","followers_url":"https://api.github.com/users/MetLob/followers","following_url":"https://api.github.com/users/MetLob/following{/other_user}","gists_url":"https://api.github.com/users/MetLob/gists{/gist_id}","starred_url":"https://api.github.com/users/MetLob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MetLob/subscriptions","organizations_url":"https://api.github.com/users/MetLob/orgs","repos_url":"https://api.github.com/users/MetLob/repos","events_url":"https://api.github.com/users/MetLob/events{/privacy}","received_events_url":"https://api.github.com/users/MetLob/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pleonex/tinke/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/pleonex/tinke/labels/plugin","name":"plugin","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"pleonex","id":3107481,"avatar_url":"https://avatars.githubusercontent.com/u/3107481?v=3","gravatar_id":"","url":"https://api.github.com/users/pleonex","html_url":"https://github.com/pleonex","followers_url":"https://api.github.com/users/pleonex/followers","following_url":"https://api.github.com/users/pleonex/following{/other_user}","gists_url":"https://api.github.com/users/pleonex/gists{/gist_id}","starred_url":"https://api.github.com/users/pleonex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pleonex/subscriptions","organizations_url":"https://api.github.com/users/pleonex/orgs","repos_url":"https://api.github.com/users/pleonex/repos","events_url":"https://api.github.com/users/pleonex/events{/privacy}","received_events_url":"https://api.github.com/users/pleonex/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2015-05-21T10:18:21Z","updated_at":"2015-08-12T22:45:03Z","closed_at":null,"body":"In *RawData.cs*, \r\nmethod: `override void Write(string fileOut, PaletteBase palette)`\r\nline 224:\r\n```c#\r\nfor (int i = image_size + StartByte; i < ori_data.Length; i++)\r\n```\r\n\r\nThis is never be to write last data from `ori_data`\r\nMaybe???:\r\n```c#\r\nfor (int i = Tiles.Length + StartByte; i < ori_data.Length; i++)\r\n```"},"comment":{"url":"https://api.github.com/repos/pleonex/tinke/issues/comments/130470015","html_url":"https://github.com/pleonex/tinke/issues/8#issuecomment-130470015","issue_url":"https://api.github.com/repos/pleonex/tinke/issues/8","id":130470015,"user":{"login":"pleonex","id":3107481,"avatar_url":"https://avatars.githubusercontent.com/u/3107481?v=3","gravatar_id":"","url":"https://api.github.com/users/pleonex","html_url":"https://github.com/pleonex","followers_url":"https://api.github.com/users/pleonex/followers","following_url":"https://api.github.com/users/pleonex/following{/other_user}","gists_url":"https://api.github.com/users/pleonex/gists{/gist_id}","starred_url":"https://api.github.com/users/pleonex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pleonex/subscriptions","organizations_url":"https://api.github.com/users/pleonex/orgs","repos_url":"https://api.github.com/users/pleonex/repos","events_url":"https://api.github.com/users/pleonex/events{/privacy}","received_events_url":"https://api.github.com/users/pleonex/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T22:45:03Z","updated_at":"2015-08-12T22:45:03Z","body":"I see what you mean. The problem is that we don't know when the *last segment* of data from the original source starts, so I was guessing with `image_size`. The *last segment* of data should be after the tiles **you are current viewing** with the image editor. In this way, the user can choose it.\r\n\r\nIn the case of importing with map compression we don't know where the tile section ends. If I replace `image_size` with `Tiles.Length` then:\r\n\r\n* If `Tiles_new.Length < Tiles_old.Length`: We would write tiles from the old original data as *last segment* data.\r\n* If `Tiles_new.Length > Tiles_old.Length`: We would skip data from the original data thinking they were tiles.\r\n\r\nI am not sure what to do here :worried:  "}}