@guajiritos/image-picker 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,37 +1,39 @@
1
- # Guajiritos Image Picker
1
+ # Guachos Image Picker
2
2
 
3
- Biblioteca angular basada en componentes de material angular para la selección, edición y compresión de imágenes en formatos png, jpeg, webp.
3
+ Angular library based on angular material components for the selection, edition and compression of images in png, jpeg, webp formats
4
+ This library was generated with Angular CLI version 13.1.3, and support until angular version 10.0.2 to the latest version of angular.
4
5
 
5
6
  ### Description
6
7
 
7
- En muchos proyectos interesa subir y editar imágenes, y en ocasiones tenemos que consultar otros programas para la compresión de imágenes y el cambio de formato para mejorar el rendimiento de la página. Con `Guajiritos Image Picker` esto es posible en tiempo real con cada imagen que quieras subir.
8
+ In many projects it is of interest to upload and edit images, and sometimes we have to consult other programs for the compression of images and the change of format to improve the performance of the page. With `GuachosImagePicker` this is possible in real time with for each image that you want to upload.
8
9
 
9
10
  ### Installation
10
11
 
11
12
  Using `npm`
12
13
 
13
14
  ```sh
14
- npm i @guajiritos/image-picker --save
15
+ npm i guachos-image-picker --save
15
16
  ```
16
17
  Using `yarn`
17
18
 
18
19
  ```sh
19
- yarn add @guajiritos/image-picker
20
+ yarn add guachos-image-picker
20
21
  ```
21
22
 
22
- `Guajiritos Image Picker` require [Angular Material](https://material.angular.io/guide/getting-started/).
23
+ `GuachosImagePicker` requires [Angular Material](https://material.angular.io/guide/getting-started/).
24
+ version 10.0.1 or higher
23
25
 
24
26
  ```sh
25
27
  ng add @angular/material
26
28
  ```
27
29
 
28
- La importación de `BrowserAnimationsModule` a su aplicación habilita el sistema de animación de Angular. Rechazar esto deshabilitará la mayoría de las animaciones de Angular Material.
29
- ### External Resource
30
+ Importing the BrowserAnimationsModule into your application enables Angular's animation system. Declining this will disable most of Angular Material's animations.
30
31
 
31
- `Guajiritos Image Picker` usa `resize-observer`, para la funcionalidad de recortar imágenes. Se utiliza la API de observador de cambio de tamaño
32
- la interfaz de cambio de tamaño del observador informa de los cambios en las dimensiones del contenido de un Elemento o del cuadro de borde, o del cuadro delimitador de un SVGElement.
32
+ ### External Resource
33
33
 
34
- Instala la librería
34
+ `GuachosImagePicker` use `resize-observer`, for the functionality of cropping images. The resize observer api is used
35
+ the resize observer interface reports changes to the dimensions of an Element's content or border box, or the bounding box of an SVGElement.
36
+ Install the package
35
37
 
36
38
  Using `npm`
37
39
 
@@ -46,30 +48,27 @@ yarn add resize-observer
46
48
 
47
49
  ### Usages
48
50
 
49
- Debes importar el módulo `Guajiritos Image Picker` donde lo usarás y usar el componente.
51
+ You must import the module `GuachosImagePicker` where you will use it and use the component
50
52
 
51
- ```ts
52
- import { GuajiritosImagePicker } from '@guajiritos/image-picker';
53
+ ```typescript
54
+ import { GuachosImagePickerModule } from 'guachos-image-picker';
53
55
 
54
56
  @NgModule({
55
- ...
56
57
  imports: [
57
- ...
58
- GuajiritosImagePicker,
59
- ...
60
- ]
58
+ GuachosImagePickerModule
59
+ ],
61
60
  })
62
61
  ```
63
62
 
64
63
  In your component:
65
64
 
66
65
  ```html
67
- <guajiritos-image-picker [_config]="imagePickerConf" ($imageChanged)="onImageChange($event)"></guajiritos-image-picker>
66
+ <guachos-image-picker [_config]="imagePickerConf" ($imageChanged)="onImageChange($event)"></guachos-image-picker>
68
67
  ```
69
68
 
70
- En el componente .ts
69
+ In .ts file
71
70
 
72
- ```ts
71
+ ```typescript
73
72
  export class ExampleComponent {
74
73
  imagePickerConf: ImagePickerConf = {
75
74
  borderRadius: '4px',
@@ -80,9 +79,9 @@ export class ExampleComponent {
80
79
  }
81
80
  ```
82
81
 
83
- ### Aquí hay un ejemplo con diferentes configuraciones.
82
+ ### Here is an example with different configurations
84
83
 
85
- ```ts
84
+ ```typescript
86
85
  export class ExampleComponent {
87
86
  config1: ImagePickerConf = {
88
87
  borderRadius: '16px',
@@ -103,21 +102,21 @@ export class ExampleComponent {
103
102
  ```
104
103
 
105
104
  ```html
106
- <h2>Uso básico</h2>
107
- <guajiritos-image-picker [_config]="config1"></guajiritos-image-picker>
105
+ <h2>Basic usage</h2>
106
+ <guachos-image-picker [_config]="config1"></guachos-image-picker>
108
107
  <br />
109
- <h2>Configuración personalizada</h2>
110
- <guajiritos-image-picker [_config]="config2"></guajiritos-image-picker>
108
+ <h2>Custom config</h2>
109
+ <guachos-image-picker [_config]="config2"></guachos-image-picker>
111
110
  <br />
112
- <h2>Imagen inicial</h2>
113
- <guajiritos-image-picker [_imageSrc]="initialImage" ($imageChanged)="onImageChanged($event)" [_config]="config3"></guajiritos-image-picker>
111
+ <h2>Initial Image</h2>
112
+ <guachos-image-picker [_imageSrc]="initialImage" ($imageChanged)="onImageChanged($event)" [_config]="config3"> </guachos-image-picker>
114
113
  ```
115
114
 
116
- ### Más sobre el componente
115
+ ### More about the component
117
116
 
118
- El componente `Guajiritos Image Picker` tiene una configuración para cambiar el ancho y largo de la imagen cargada. Además del idioma (solo 'es' y 'en'). También tiene una opción de compresión inicial que por defecto es true. La interfaz se ve así:
117
+ The `GuachosImagePicker` component has a setting to change the width and length of the loaded image. In addition to the language (only 'es' and 'en'). It also has an initial compression option that by default is true. The interface looks like this:
119
118
 
120
- ```ts
119
+ ```typescript
121
120
  export interface ImagePickerConf {
122
121
  width?: string;
123
122
  height?: string;
@@ -127,14 +126,15 @@ export interface ImagePickerConf {
127
126
  }
128
127
  ```
129
128
 
130
- ### Panel de edición
131
-
132
- Una vez que haya seleccionado una imagen, se habilitarán tres botones debajo de la imagen:
129
+ ### Editing panel
133
130
 
131
+ Once you have selected an image, three buttons are enabled below the image:
134
132
  ```text
135
- 1- Cargar una nueva imagen.
136
- 2- Abrir el panel de edición.
137
- 3- Descargar la imagen.
133
+ 1- Load a new image.
134
+ 2- Open the editing panel.
135
+ 3- DOWNLOAD.
138
136
  ```
139
137
 
140
- En el panel de edición, puede cambiar la relación de calidad para comprimir el tamaño del archivo (en kb). También se puede seleccionar el cambio de ancho y alto en px manteniendo la relación de aspecto o no. Puede cambiar el formato de la imagen como desee, las opciones son 'png', 'webp', 'jpeg'. El formato 'Png' no se ve afectado por cambiar la relación de calidad.
138
+
139
+ In the edit panel, you can change the quality ratio to compress the file size (in kb). Also changing width and height in px keeping aspect ratio or not, is selectable. You can change the image format as you wish, the options are 'png', 'webp','jpeg'. The 'Png' format is not affected by changing the quality ratio.
140
+