Bug 39730 - Image slicing info removed from Contents.json when editing and saving an Image Set that had slicing info from XCode.
Summary: Image slicing info removed from Contents.json when editing and saving an Imag...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: 5.10 (C6SR3)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-03-17 17:27 UTC by Jon Goldberger [MSFT]
Modified: 2016-04-01 14:34 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
test project (63.10 KB, application/zip)
2016-03-17 17:27 UTC, Jon Goldberger [MSFT]
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jon Goldberger [MSFT] 2016-03-17 17:27:47 UTC
Created attachment 15441 [details]
test project

## Description

Xcode allows you to create a 9-patch image directly in the Asset Catalog Image Set editor. You can use this sliced up image set in Xamarin (except slicing won't be displayed in iOS Designer [bug #39703, bug #39704], but will on simulator/device). However if the image set is edited and saved in Xamarin Studio, the slicing info is removed. 

IOW, here is what I see in a sliced up Image Set when that image set is created and sliced up in Xcode:

>    {
>      "resizing" : {
>        "mode" : "9-part",
>        "center" : {
>          "mode" : "tile",
>          "width" : 81,
>          "height" : 16
>        },
>        "cap-insets" : {
>          "bottom" : 46,
>          "top" : 5,
>          "right" : 4,
>          "left" : 6
>        }
>      },
>      "idiom" : "universal",
>      "filename" : "Einstein.png",
>      "scale" : "1x"
>    }

After making a change and saving, the resizing info is gone:

>{
>      "filename": "Einstein.png",
>      "scale": "1x",
>      "idiom": "universal"
>},


## Steps to reproduce

1. Open the attached test project in Xamarin Studio (or Visual Studio)

2. Open Contents.json in a text editor. Note the resizing info as above.

3. Add an image to the image set and save.

4. Open Contents.json in a text editor. 

Expected result: Resizing info would still be there.

Actual result: Resizing info is removed. 


## Environment

=== Xamarin Studio ===

Version 5.10.3 (build 26)
Installation UUID: 964c531b-d928-456b-a9ae-e1f82266b360
Runtime:
	Mono 4.2.3 (explicit/832de4b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402030004

=== Xamarin.Profiler ===

Version: 0.32.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: 6.0.2.1 (Business Edition)
Android SDK: /Users/apple/Library/Developer/Xamarin/android-sdk-mac_x86
	Supported Android versions:
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Apple Developer Tools ===

Xcode 7.2.1 (9548.1)
Build 7C1002

=== Xamarin.Mac ===

Version: 2.4.1.7 (Business Edition)

=== Xamarin.iOS ===

Version: 9.4.2.27 (Business Edition)
Hash: 58ba2bc
Branch: master
Build date: 2016-03-03 09:05:19-0500

=== Xamarin Inspector ===

Version: 0.5.0.0
Hash: 45b35bb
Branch: master
Build date: Thu Jan 14 18:53:32 UTC 2016

=== Build Information ===

Release ID: 510030026
Git revision: ac9b7fcba9ee92ac30c8eb90f20c2228ce033efa
Build date: 2016-03-01 18:02:09-05
Xamarin addins: 633fde3bf405e3c402a51980976c431c204cf4f6
Build lane: monodevelop-lion-cycle6-c6sr2

=== Operating System ===

Mac OS X 10.11.3
Darwin Jons-iMac.local 15.3.0 Darwin Kernel Version 15.3.0
    Thu Dec 10 18:40:58 PST 2015
    root:xnu-3248.30.4~1/RELEASE_X86_64 x86_64
Comment 1 Jon Goldberger [MSFT] 2016-03-17 17:37:09 UTC
Issue occurs in XVS as well. Separate bug filed bug #39731
Comment 2 Jeffrey Stedfast 2016-03-18 17:56:55 UTC
Fixed in git master and cycle7
Comment 3 xamarin-release-manager 2016-03-21 11:04:47 UTC
Fixed in version 6.0.0.4840 (cycle7)

Author: Jeffrey Stedfast
Commit: a6009fa4fa55133fa12d130b0cad588996345d8c (xamarin/md-addins)
Included in Commit: 22b2dfd5e68e85e894acc1766151b2c17230f013 (mono/monodevelop)
Comment 4 xamarin-release-manager 2016-04-01 14:34:56 UTC
Fixed in version 6.0.0.4773 (cycle7-android-n)

Author: Jeffrey Stedfast
Commit: a6009fa4fa55133fa12d130b0cad588996345d8c (xamarin/md-addins)
Included in Commit: 59b7ad8f33177a4fad8833d1bf7fd4c2d21a7391 (mono/monodevelop)