From c958b25a18fd917d1a89daef4afc1d362eaf85dc Mon Sep 17 00:00:00 2001 From: yasirkula Date: Sun, 15 Oct 2023 14:34:41 +0300 Subject: [PATCH] Fixed #9 --- .../java/com/yasirkula/unity/TextureOps.java | 47 +++++++++------- Plugins/TextureOps/Android/TextureOps.aar | Bin 4823 -> 4816 bytes Plugins/TextureOps/README.txt | 50 ++---------------- Plugins/TextureOps/TextureOps.cs | 5 +- package.json | 2 +- 5 files changed, 36 insertions(+), 68 deletions(-) diff --git a/.github/AAR Source (Android)/java/com/yasirkula/unity/TextureOps.java b/.github/AAR Source (Android)/java/com/yasirkula/unity/TextureOps.java index 74fae11..59525cc 100644 --- a/.github/AAR Source (Android)/java/com/yasirkula/unity/TextureOps.java +++ b/.github/AAR Source (Android)/java/com/yasirkula/unity/TextureOps.java @@ -291,24 +291,31 @@ else if( orientation == ExifInterface.ORIENTATION_TRANSVERSE ) public static String GetVideoProperties( Context context, final String path ) { MediaMetadataRetriever metadataRetriever = new MediaMetadataRetriever(); - metadataRetriever.setDataSource( path ); - - String width = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH ); - String height = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT ); - String duration = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_DURATION ); - String rotation = "0"; - if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ) - rotation = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION ); - - if( width == null ) - width = "0"; - if( height == null ) - height = "0"; - if( duration == null ) - duration = "0"; - if( rotation == null ) - rotation = "0"; - - return width + ">" + height + ">" + duration + ">" + rotation; + try + { + metadataRetriever.setDataSource( path ); + + String width = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_VIDEO_WIDTH ); + String height = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_VIDEO_HEIGHT ); + String duration = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_DURATION ); + String rotation = "0"; + if( Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 ) + rotation = metadataRetriever.extractMetadata( MediaMetadataRetriever.METADATA_KEY_VIDEO_ROTATION ); + + if( width == null ) + width = "0"; + if( height == null ) + height = "0"; + if( duration == null ) + duration = "0"; + if( rotation == null ) + rotation = "0"; + + return width + ">" + height + ">" + duration + ">" + rotation; + } + finally + { + metadataRetriever.release(); + } } -} +} \ No newline at end of file diff --git a/Plugins/TextureOps/Android/TextureOps.aar b/Plugins/TextureOps/Android/TextureOps.aar index 1c098d0e1822b145e02e9ad56e01a404bbd8a7a4..5259d9cb1ec388ad04febd27b1874bb532ca3eca 100644 GIT binary patch delta 4639 zcmZ{obyU<}x5f#P?vw#VN+bqJ>69F#q?GO+8V1JUD+imIt@qxw?%iiS>)B_Wy`S^{=L^pSkD)$<@D>B!KlS-tf?@o=kvQMq{vT2N zmA9{#bAYX{1K1ztFXZm%=*?m8Ve99|VejP$4z~4k^>q*MumuM|UHyZ>{2Xu&epwDg z+9J&$@b6F(JXL=^Q+e)WyFMB`yy?Fp{~P*W5srRfH(TFCv#rOVgdVj>L!(*_7Xzd* zm!w48f~<*(fj}*%N+oyWjN8xl*|-vy*wgvmlGgp~3Lr!NL8TMVa7`7<)GTx@Bm`KGkXmiRrzB z<`(jWfiH`FEU|QczClXGhBhbooAeLAKtBKKdl!lrqKMT$N;*&X|9pPZHBx*M`-Iq) zwP0FilAOKp&lz4M*Qf8TsDkKIue8o)#2@tqyiCCEN{8pu?(#_~sDT)0@N|EPD|77* z`sJRHSL3;jB?PLt)t%&>4kDsz)oyT6wIh>JwF1GTSg}x4NsQbsSDVnMZOJNMTb4p~ zT=P`aEBK&&pqZX$+dJ}Krko1(F%$`%qHCmYJ8Vd^$$XaNtpX_@@wO4^=VjeIH~EDR z#@cUV-}#Sgi6xMC#AgEEbJxnpIj22avik0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RmNXt+f9_Md%wYEU0O6;NtbxP!4vWM>c2Hu~+ z^7eC23uk#_T)e+@FwB%Hc%fOB8#rIaK+u0W;w$ERly4R2C&g`hg|%I(TIo`p8>?Y| z>!IjWeQ1ge;ZS+$=;w6Ko#wS z-Bu4#>$_CHlBC{^AopoytjRqu7C@2tq!!haMM1iv)S~U&iNWp2K~FU^FS2JhoL?;? zCaWo$Zfb@v2nc*V&Vojq{l0HANx3vIqG956l@M~-rwCzwQcI$HeO8fDG!|DtQ6~{i zQ6=^Ytf&`fAe$*9eb~ZRLB3W3kr40>ihEPg@pU`RY&4Li%X*b%?=SWMJcco!iXQAM zp+nd&gEsiVRP+IXBEG$B!tZ4>n&OX5(-S^F~hbwSQ`&%!FoQ~>6 z^n+O(!I|VTEzm^qbYYPa!n+~bt^BJP@~1chfdhS?cTr}fj@B?@pkR9$xBRr+9j(=| z18tu~YRYEq6*(JmFiC%~$sG5tS50%Yls?`_rl1A7)i1llUl&mQ$r$&|Md**o`2ZRG ztz97-K2MpZ%?*ZJ?bg&w2eytDGbnQ(iBsQ#fxKQP$;t8f!eW_y2g(3?0im3HAY>&| z`99w|4xxsb?R?n}$QWF0Y~WwT9+4vJY-C$U`+GCYWMam1m-zPEUa$88N zmE|{eSFsta)sFiyZX-MIhAAfyJLi z@z46dfe7lqP7y$apjdDT@+8|5!oU0M^yTryvsaP-5B>j!A^)TU|H7+3_y5X9{+o_B zO{L#QyoeBDp6&>HriPAwqWFRX{~vlySFD=o76h95j2V6wF6h7CzV;lxh&h_OI@y>j znmF26TDZBhdOO(vxrFz581&~43E9WiE6? TextureOps.LoadImageAsync( string imagePath, int maxSize = -1, TextureOps.Options options ): creates a Texture2D from the specified image file and returns it. - -//// TEXTURE OPERATIONS //// -// NOTE: on some Android devices, these functions may not work correctly when called with a 'sourceTex' that was created in the same frame. Therefore, if you'd like to call these functions immediately after 'LoadImage', consider instead waiting for at least one frame. You can use `yield return null;` in a coroutine to wait for one frame. - -Texture2D TextureOps.Crop( Texture2D, sourceTex, int leftOffset, int topOffset, int width, int height, TextureFormat format = TextureFormat.RGBA32, TextureOps.Options options ): crops sourceTex and returns the cropped texture. -Texture2D TextureOps.Scale( Texture2D sourceTex, int targetWidth, int targetHeight, TextureFormat format = TextureFormat.RGBA32, TextureOps.Options options ): scales sourceTex to the specified size and returns the scaled texture. sourceTex's aspect ratio may not be preserved. -Texture2D TextureOps.ScaleFill( Texture2D sourceTex, int targetWidth, int targetHeight, Color32 fillColor, TextureFormat format = TextureFormat.RGBA32, TextureOps.Options options ): scales sourceTex to the specified size and returns the scaled texture. sourceTex's aspect ratio is preserved and blank space is filled with fillColor. -Texture2D[] TextureOps.Slice( Texture2D sourceTex, int sliceTexWidth, int sliceTexHeight, TextureFormat format = TextureFormat.RGBA32, TextureOps.Options options ): slices sourceTex into smaller textures and returns these textures in an array. sourceTex is sliced row-by-row, starting from top-left corner. - -//// UTILITY FUNCTIONS //// -TextureOps.ImageProperties TextureOps.GetImageProperties( string imagePath ): [Android & iOS only] returns an ImageProperties instance that holds the width, height, mime type and EXIF orientation information of an image file without creating a Texture2D object. Mime type will be null, if it can't be determined. -TextureOps.VideoProperties TextureOps.GetVideoProperties( string videoPath ): [Android & iOS only] returns a VideoProperties instance that holds the width, height, duration (in milliseconds) and rotation information of a video file. \ No newline at end of file +Documentation: https://github.com/yasirkula/UnityTextureOps +Example code: https://github.com/yasirkula/UnityTextureOps#example-code +E-mail: yasirkula@gmail.com \ No newline at end of file diff --git a/Plugins/TextureOps/TextureOps.cs b/Plugins/TextureOps/TextureOps.cs index 40ccec5..ab5d8fa 100644 --- a/Plugins/TextureOps/TextureOps.cs +++ b/Plugins/TextureOps/TextureOps.cs @@ -159,7 +159,10 @@ public static bool SaveImage( byte[] sourceBytes, string imagePath ) try { - Directory.CreateDirectory( Path.GetDirectoryName( imagePath ) ); + string parentDirectoryPath = Path.GetDirectoryName( imagePath ); + if( !Directory.Exists( parentDirectoryPath ) ) + Directory.CreateDirectory( parentDirectoryPath ); + File.WriteAllBytes( imagePath, sourceBytes ); } catch( Exception e ) diff --git a/package.json b/package.json index 6b8d564..ab011a4 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.yasirkula.textureops", "displayName": "Texture Ops", - "version": "1.2.2", + "version": "1.2.3", "documentationUrl": "https://github.com/yasirkula/UnityTextureOps", "changelogUrl": "https://github.com/yasirkula/UnityTextureOps/releases", "licensesUrl": "https://github.com/yasirkula/UnityTextureOps/blob/master/LICENSE.txt",