@rosepetal/node-red-contrib-image-tools 1.3.0 → 1.3.2

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.
@@ -16,7 +16,7 @@ The `image-out` node is the primary output point for saving processed images to
16
16
  ### Inputs
17
17
  The node accepts either:
18
18
  - **Raw Image Object**: Standard format with `data`, `width`, `height`, `channels`, `colorSpace`
19
- - **Encoded Buffer**: JPEG, PNG, or WebP buffer (automatically detected and handled)
19
+ - **Encoded Buffer**: JPEG, PNG, or WebP buffer (automatically detected and handled). Note: BMP output is not supported from encoded buffers — use raw image objects instead.
20
20
 
21
21
  ### Outputs
22
22
  This is a terminal node with no outputs. It saves images to the filesystem and displays status information.
@@ -51,9 +51,10 @@ This is a terminal node with no outputs. It saves images to the filesystem and d
51
51
  - **Accepts**: Both raw image objects and encoded buffers
52
52
 
53
53
  ### Output Format
54
- - **Options**: JPEG, PNG, WebP
54
+ - **Options**: JPEG, PNG, WebP, BMP
55
55
  - **Description**: Target format for saved images
56
56
  - **Conversion**: Automatic conversion if input format differs
57
+ - **BMP**: Uncompressed format with no quality/compression settings. Requires raw image data input.
57
58
 
58
59
  ### Quality
59
60
  - **Type**: Number (1-100)
@@ -146,10 +147,11 @@ Common errors and solutions:
146
147
 
147
148
  1. **Use Prefixes**: Identify image sources with meaningful prefixes
148
149
  2. **Enable Protection**: Keep overwrite protection on to prevent data loss
149
- 3. **Choose Format Wisely**:
150
+ 3. **Choose Format Wisely**:
150
151
  - JPEG for photos (smaller files)
151
152
  - PNG for graphics with transparency
152
153
  - WebP for web optimization
154
+ - BMP for uncompressed archival or when lossless pixel-exact output is needed
153
155
  4. **Button Control**: Disable during development to prevent unwanted saves
154
156
  5. **Monitor Status**: Check node status for save confirmations
155
157
 
package/install.sh CHANGED
@@ -107,23 +107,15 @@ main() {
107
107
  exit 1
108
108
  fi
109
109
 
110
- print_step "Installing the Node-RED package..."
111
- cd "$SCRIPT_DIR/node-red-contrib-image-tools"
110
+ print_step "Installing dependencies..."
111
+ cd "$SCRIPT_DIR"
112
112
  if npm install; then
113
- print_success "Node-RED package installed successfully."
113
+ print_success "Dependencies installed successfully."
114
114
  else
115
- print_error "Failed to install the Node-RED package."
115
+ print_error "Failed to install dependencies."
116
116
  exit 1
117
117
  fi
118
118
 
119
- print_step "Adding legacy node type compatibility..."
120
- cd "$SCRIPT_DIR"
121
- if node scripts/dual-register.js; then
122
- print_success "Legacy compatibility added."
123
- else
124
- print_info "Warning: Legacy compatibility script failed. Old flow type names may not work."
125
- fi
126
-
127
119
  echo "================================================="
128
120
  print_success "Build complete!"
129
121
  echo "================================================="
@@ -136,13 +128,13 @@ main() {
136
128
  echo
137
129
  if [[ $REPLY =~ ^[Yy]$ ]]; then
138
130
  print_info "Installing into Node-RED..."
139
- (cd "$NODE_RED_DIR" && npm install "$SCRIPT_DIR/node-red-contrib-image-tools")
131
+ (cd "$NODE_RED_DIR" && npm install "$SCRIPT_DIR")
140
132
  print_success "Successfully installed in Node-RED."
141
133
  print_info "Please restart your Node-RED instance to see the new nodes."
142
134
  else
143
135
  print_info "Skipping automatic installation."
144
136
  print_info "You can install it later by running this command:"
145
- print_info " cd ~/.node-red && npm install $SCRIPT_DIR/node-red-contrib-image-tools"
137
+ print_info " cd ~/.node-red && npm install $SCRIPT_DIR"
146
138
  fi
147
139
  fi
148
140
  }