89 Commits

Author SHA1 Message Date
Umberto Lentini
3458ffedad fix(ios): outputPath on iOS can contain an absolute path 2018-06-13 20:11:11 +02:00
AntoineDoubovetzky
16505b771e chore(example): update package version 2018-06-13 19:41:25 +02:00
AntoineDoubovetzky
8bff548446 chore(android): modernize example 2018-06-13 19:39:53 +02:00
AntoineDoubovetzky
be99bac398 chore(android): add gradle 2018-06-13 19:37:51 +02:00
AntoineDoubovetzky
ca0de304b9 style: use prettier 2018-06-13 19:34:15 +02:00
Florian Rival
4ed8798020
Merge pull request #120 from Gerharddc/patch-1
Export under default in d.ts
2017-12-20 20:51:17 +01:00
Gerhard de Clercq
615b06ea0e
Export under default in d.ts
The current typings do not work at all as they do not expect the function to be under 'default' and this means that either ts fails or your code does not work. My proposal here works but it suggests that a class exists even though it doens't but I am not sure how to do it in another way. Even though this is technically wrong it is better than what is now used.
2017-12-17 10:42:07 +02:00
Florian Rival
cf535e3783 Merge pull request #111 from katsumeshi/master
Make ImageResizer Android class public
2017-10-18 00:00:06 +02:00
Yuki Matsushita
13cdedc64a fix error: ImageResizer is not public 2017-10-17 08:02:27 -07:00
Michał Pierzchała
6fd88e7666 Use RCTBridgeModule.h instead of RCTBridge.h (#109)
Looks like `RCTBridge.h` got deprecated and official docs use `#import <React/RCTBridge.h>` form anyway. This also makes this lib usable under (at least) RN 0.48
2017-10-15 23:19:46 +02:00
Kesha Antonov
8e6b1fdbbb Update Android build tools (#110) 2017-10-15 23:18:35 +02:00
Alexander Sergeev
cefb679432 Fix crash OutOfMemoryError. (#103) 2017-09-17 15:51:45 +02:00
Sirui Li
7b9445743c Fix Flow type default export (#99)
The actual JS module only has a default export of an object with `createResizedImage` function.

This PR update the Flow definition to match the usage of the module. This fixes the following flow error:

```
 18: import ImageResizer from 'react-native-image-resizer';
            ^^^^^^^^^^^^ Default import from `react-native-image-resizer`. This module has no default export.
```
2017-08-31 09:16:18 +02:00
oximer
e7c4ef5473 Update README.md with manual linking for Android (#101) 2017-08-31 09:15:27 +02:00
Mark Miyashita
9c891a7bbc [Dependencies] Update react peerDependency semver range to support 16-alpha and 16-beta (#100) 2017-08-30 12:43:21 +02:00
Florian Rival
7cd8e3c537 chore(version): Bump version 1.0.0 2017-08-17 21:56:18 +02:00
Florian Rival
d60dd0fe7d Update README about the change in library interface 2017-08-17 21:55:34 +02:00
Florian Rival
fa6acf8447 Update flow typing according to latest changes in the library interface 2017-08-17 21:48:58 +02:00
Florian Rival
433b6bb9c4 Update README 2017-08-17 21:44:58 +02:00
Florian Rival
15ea06d765 Update example according to latest changes in createResizedImage interface 2017-08-17 21:42:32 +02:00
Mark Miyashita
975d9097d3 Support react 16 with react-native 0.47+ (#96) 2017-08-12 01:34:19 +01:00
Dmitry Patsura
90ef9daac2 Add Flow support (#94) 2017-08-07 09:06:02 +02:00
Sibelius Seraphini
e24f2e8da1 Fix compatibility with RN 0.47 (#93) 2017-08-02 18:11:46 +02:00
Umberto Lentini
b92d8de42a Fix error reporting, path handling and extension naming on iOS (#90)
* `saveFile` used to return always `YES`, now it returns whether or not the save has been saved.
* `generateFilePath` didn’t do any check about the path. Now it creates the in the app directory. If for some reason it fails, it throws an Exception.
* `saveFile` can handle png extension and path issues. A bug on a `nil` fileSize has been fixed.
2017-07-20 17:19:24 +02:00
Marco Cimmino
544dd9d473 Unify returned value between Android and iOS implementation, (#83)
previously Android implementation worked differently and to the returned
absolute path a 'file:' is prepended.

This different behaviour may causes issues/bugs when handling the response from an
unified code base point of view and also the returned uri on the Android native code
is not generated properly using native functions to do so.

This patch fixes this incoherence, but also extends the returned value to add:
absolute path, file name, file size and the uri.
Refactored Android code to make it easier to read and more robust to
case sensitive file names.
2017-07-18 23:05:26 +02:00
Florian Rival
711527e2b4 chore(version): Bump version 0.1.1 2017-05-09 00:05:57 +02:00
Florian Rival
096f281d9e Fix example to work with the specified React Native version (#79) 2017-05-09 00:02:58 +02:00
Florian Rival
d568ed104a Update minimum React Native version in README 2017-02-26 13:42:17 +01:00
Abe Botros
aef2a9c7d8 Minor Android fixes for empty/failed return paths (#67)
- Throw exception instead of returning null sourceImage, which avoids
  returning pseudo-empty "file:" string to Javascript on failure
- Use constant strings for checking path prefixes
- Cleanup of conditional statements for checking path prefixes
- Additional try-catch statements, contributing more-fine-grained
  error messages

Other
- Updated .gitignore to latest React Native template
- Updated Android gradle scripts
- Updated package.json's in root and in example to point to
  correct react/react-native versions, and to use local code
  for this library directly in the example app
2017-02-10 11:21:55 +01:00
William Candillon
d762433fe8 Create index.d.ts (#64) 2017-01-30 14:06:30 +01:00
Kevin Cooper
2680941ae0 Add note to README explaining file: prefix (#62)
Resolves #50.
2017-01-20 19:33:23 +01:00
Florian Rival
37642cf4f3 chore(version): Bump version
Also update README to support RN 0.40 and older

Latest version is supported only by React Native 0.40+
0.1.0
2017-01-15 22:58:02 +01:00
Antti Ala-Ilkka
d8ddf31bd2 Support react-native > 0.40 2017-01-15 22:58:02 +01:00
Florian Rival
fd4ec2f814 Fix README 2016-11-05 22:31:36 +01:00
Florian Rival
28f81335cc chore(version): Bump version 0.0.12 2016-11-05 22:27:04 +01:00
Ian Grayson
8514b33d29 Add podspec file (#52) 2016-10-14 21:37:45 +02:00
Chris Fogelklou
8a485bf0a9 Add support for base64 formatted Uri strings on Android. (#47) 2016-09-22 08:18:06 +02:00
cfogelklou
af2a09e1d8 Add basic support for rotation on iOS (#46) 2016-09-20 17:08:27 +02:00
Lam Ng
8bb52ccf8d Fix readme (#45)
* fix install guide

* install guide < 0.29.2

* remove android settings.gradle
2016-09-16 17:51:06 +02:00
Florian Rival
bf82709719 chore(version): Bump version 0.0.11 2016-09-12 19:59:23 +02:00
Luke Fanning
9b3d0fd29b Add support for PNG compression on iOS (#43) 2016-09-12 19:57:49 +02:00
Florian Rival
1f4514937b Add link to react-native-numberpicker-dialog 2016-09-09 14:22:51 +03:00
Florian Rival
6a28444db9 chore(version): Bump version 0.0.10 2016-09-07 08:56:45 +03:00
Andrew Shini
ab1a39bf54 Always rotate the image with the proper up orientation on Android (#42) 2016-09-04 10:20:00 +02:00
Florian Rival
fff95be7c2 chore(version): Bump version 0.0.9 2016-08-26 16:48:51 +02:00
Steven Scaffidi
8e9adf7a13 Get rid of deprecation warning on iOS. (#38) 2016-08-24 00:24:30 +02:00
Florian Rival
ad4a4070eb Upgrade the example to react-native 0.31 0.0.8 2016-08-21 21:40:20 +02:00
Florian Rival
51176d697a Bump version 2016-08-21 21:17:51 +02:00
Florian Rival
edad5c3064 refactor(android): Refactor various part of ImageResizer 2016-08-21 20:36:41 +02:00
Florian Rival
442627bd37 refactor(android): Remove useless arguments, fix typo and style 2016-08-21 20:07:05 +02:00