@@ -227,10 +227,10 @@ private function _getCallback($callbackType, $fileType = null, $unsupportedText
227
227
$ fileType = $ this ->_fileType ;
228
228
}
229
229
if (empty (self ::$ _callbacks [$ fileType ])) {
230
- throw new Exception ("{$ unsupportedText }. Type was : {$ fileType }. File was : {$ this ->_fileName }" );
230
+ throw new Exception ("{$ unsupportedText }. Type: {$ fileType }. File: {$ this ->_fileName }" );
231
231
}
232
232
if (empty (self ::$ _callbacks [$ fileType ][$ callbackType ])) {
233
- throw new Exception ("Callback not found. Callbacktype was : {$ callbackType }. File was : {$ this ->_fileName }" );
233
+ throw new Exception ("Callback not found. Callbacktype: {$ callbackType }. File: {$ this ->_fileName }" );
234
234
}
235
235
return self ::$ _callbacks [$ fileType ][$ callbackType ];
236
236
}
@@ -245,17 +245,17 @@ private function _fillBackgroundColor(&$imageResourceTo)
245
245
// fill truecolor png with alpha transparency
246
246
if ($ isAlpha ) {
247
247
if (!imagealphablending ($ imageResourceTo , false )) {
248
- throw new Exception ('Failed to set alpha blending for PNG image. File was : {$this->_fileName} ' );
248
+ throw new Exception ('Failed to set alpha blending for PNG image. File: {$this->_fileName} ' );
249
249
}
250
250
$ transparentAlphaColor = imagecolorallocatealpha ($ imageResourceTo , 0 , 0 , 0 , 127 );
251
251
if (false === $ transparentAlphaColor ) {
252
- throw new Exception ('Failed to allocate alpha transparency for PNG image. File was : {$this->_fileName} ' );
252
+ throw new Exception ('Failed to allocate alpha transparency for PNG image. File: {$this->_fileName} ' );
253
253
}
254
254
if (!imagefill ($ imageResourceTo , 0 , 0 , $ transparentAlphaColor )) {
255
- throw new Exception ('Failed to fill PNG image with alpha transparency. File was : {$this->_fileName} ' );
255
+ throw new Exception ('Failed to fill PNG image with alpha transparency. File: {$this->_fileName} ' );
256
256
}
257
257
if (!imagesavealpha ($ imageResourceTo , true )) {
258
- throw new Exception ('Failed to save alpha transparency into PNG image. File was : {$this->_fileName} ' );
258
+ throw new Exception ('Failed to save alpha transparency into PNG image. File: {$this->_fileName} ' );
259
259
}
260
260
261
261
return $ transparentAlphaColor ;
@@ -281,7 +281,7 @@ private function _fillBackgroundColor(&$imageResourceTo)
281
281
list ($ r , $ g , $ b ) = $ this ->_backgroundColor ;
282
282
$ color = imagecolorallocate ($ imageResourceTo , $ r , $ g , $ b );
283
283
if (!imagefill ($ imageResourceTo , 0 , 0 , $ color )) {
284
- throw new Exception ("Failed to fill image background with color {$ r } {$ g } {$ b }. File was : {$ this ->_fileName }" );
284
+ throw new Exception ("Failed to fill image background with color {$ r } {$ g } {$ b }. File: {$ this ->_fileName }" );
285
285
}
286
286
287
287
return $ color ;
@@ -329,7 +329,7 @@ private function _getTransparency($imageResource, $fileType, &$isAlpha = false,
329
329
public function resize ($ frameWidth = null , $ frameHeight = null )
330
330
{
331
331
if (empty ($ frameWidth ) && empty ($ frameHeight )) {
332
- throw new Exception ('Invalid image dimensions. File was : {$this->_fileName} ' );
332
+ throw new Exception ('Invalid image dimensions. File: {$this->_fileName} ' );
333
333
}
334
334
335
335
// calculate lacking dimension
0 commit comments