Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
forSaveFailed example
imagealphablending
(
$this
->resource, false
)
;
imagesavealpha
(
$this
->resource, true
)
;
}
switch
(
$this
->
image
(
)
->imageType
)
{
case
IMAGETYPE_GIF:
if
(
!
function_exists
(
'imagegif'
)
)
{
throw
ImageException::
forInvalidImageCreate
(
lang
(
'Images.gifNotSupported'
)
)
;
}
if
(
! @
imagegif
(
$this
->resource,
$target
)
)
{
throw
ImageException::
forSaveFailed
(
)
;
}
break
;
case
IMAGETYPE_JPEG:
if
(
!
function_exists
(
'imagejpeg'
)
)
{
throw
ImageException::
forInvalidImageCreate
(
lang
(
'Images.jpgNotSupported'
)
)
;
}
if
(
! @
imagejpeg
(
$this
->resource,
$target
,
$quality
)
)
{
throw
ImageException::
forSaveFailed
(
)
;
}