Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to v1.0.3 SDWebImage Version #11

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ TestResult.xml
[Rr]eleasePS/
dlldata.c

Carthage/

*_i.c
*_p.c
*_i.h
Expand Down Expand Up @@ -194,5 +196,9 @@ FakesAssemblies/

# Visual Studio 6 workspace options file
*.opt
WebP.Touch/.droidres/.webp.touch.droidres.db
*.xcuserstate
WebP.Touch/.droidres/.webp.touch.droidres.db
*.xcuserstate

xcshareddata
xcuserdata/
*.xcuserdata/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ NuGet package can be found here: https://www.nuget.org/packages/WebP.Touch
# WebP framework
Original WebP framework comes from http://downloads.webmproject.org/releases/webp/index.html
Content is extracted from the framework and bindings are created for the native libraries.
Currently we use libwebp-0.6.1
Currently we use libwebp-1.0.3 from SDWebImage (https://github.com/SDWebImage/libwebp-Xcode)

# XCode wrapper project
This project is used to expose some simple methods to use the original WebP.framework
Expand Down
2 changes: 1 addition & 1 deletion WebP.Mac/Demo.Mac/ViewController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private async void LoadImage()
{
var decoder = new WebP.Mac.WebPCodec();
var httpClient = new HttpClient();
using (var stream = await httpClient.GetStreamAsync("http://www.gstatic.com/webp/gallery/1.webp").ConfigureAwait(false))
using (var stream = await httpClient.GetStreamAsync("https://res.cloudinary.com/demo/image/upload/w_300/sample.webp").ConfigureAwait(false))
{
var image = decoder.Decode(stream);
InvokeOnMainThread(() =>
Expand Down
2 changes: 1 addition & 1 deletion WebP.Mac/WebP.Mac/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.3")]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason to have the Build specified?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want the assembly to have the same version as the main library.

Any subsequence changes will be increase 1 by 1.

E.g. if native library version is 1.0.3 then our first binding version will be 1.0.3.

If there are any corrections afterward, we will increase version by the forth part -> 1.0.3.x.

That way we will know what is the actual version of the native library easily.

You might check out the way Xamarin support libraries versioned.


// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
Expand Down
10 changes: 6 additions & 4 deletions WebP.Mac/WebP.Mac/WebP.Mac.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WebP.linkwith.cs">
<DependentUpon>WebP.a</DependentUpon>
</Compile>
<Compile Include="libWebPWrapper.linkwith.cs">
<DependentUpon>libWebPWrapper.a</DependentUpon>
</Compile>
Expand All @@ -52,7 +49,12 @@
</ItemGroup>
<ItemGroup>
<ObjcBindingNativeLibrary Include="libWebPWrapper.a" />
<ObjcBindingNativeLibrary Include="WebP.a" />
</ItemGroup>
<ItemGroup>
<NativeReference Include="..\frameworks\libwebp.framework">
<Kind>Framework</Kind>
<SmartLink>False</SmartLink>
</NativeReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.ObjcBinding.CSharp.targets" />
</Project>
17 changes: 17 additions & 0 deletions WebP.Mac/WebP.Mac/WebP.Mac.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebP.Mac", "WebP.Mac.csproj", "{F014F861-B368-40C3-B97E-D54FC8F4A2BB}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F014F861-B368-40C3-B97E-D54FC8F4A2BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F014F861-B368-40C3-B97E-D54FC8F4A2BB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F014F861-B368-40C3-B97E-D54FC8F4A2BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F014F861-B368-40C3-B97E-D54FC8F4A2BB}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Binary file removed WebP.Mac/WebP.Mac/WebP.a
Binary file not shown.
4 changes: 0 additions & 4 deletions WebP.Mac/WebP.Mac/WebP.linkwith.cs

This file was deleted.

Binary file modified WebP.Mac/WebP.Mac/libWebPWrapper.a
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ WEBP_EXTERN int WebPGetDecoderVersion(void);
// This function will also validate the header, returning true on success,
// false otherwise. '*width' and '*height' are only valid on successful return.
// Pointers 'width' and 'height' can be passed NULL if deemed irrelevant.
// Note: The following chunk sequences (before the raw VP8/VP8L data) are
// considered valid by this function:
// RIFF + VP8(L)
// RIFF + VP8X + (optional chunks) + VP8(L)
// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
WEBP_EXTERN int WebPGetInfo(const uint8_t* data, size_t data_size,
int* width, int* height);

Expand Down Expand Up @@ -425,6 +431,12 @@ WEBP_EXTERN VP8StatusCode WebPGetFeaturesInternal(
// Returns VP8_STATUS_OK when the features are successfully retrieved. Returns
// VP8_STATUS_NOT_ENOUGH_DATA when more data is needed to retrieve the
// features from headers. Returns error in other cases.
// Note: The following chunk sequences (before the raw VP8/VP8L data) are
// considered valid by this function:
// RIFF + VP8(L)
// RIFF + VP8X + (optional chunks) + VP8(L)
// ALPH + VP8 <-- Not a valid WebP format: only allowed for internal purpose.
// VP8(L) <-- Not a valid WebP format: only allowed for internal purpose.
static WEBP_INLINE VP8StatusCode WebPGetFeatures(
const uint8_t* data, size_t data_size,
WebPBitstreamFeatures* features) {
Expand Down Expand Up @@ -491,4 +503,4 @@ WEBP_EXTERN VP8StatusCode WebPDecode(const uint8_t* data, size_t data_size,
} // extern "C"
#endif

#endif /* WEBP_WEBP_DECODE_H_ */
#endif // WEBP_WEBP_DECODE_H_
Loading