이미지 오버레이 앱을 만들려고합니다. 업로드 된 이미지에 워터 마크가 추가됩니다. 이 이미지를 사용하여 이미지 오버레이를 완료했습니다. tutorial, 이제 croppie.js을 사용하여 자르기 기능을 추가해야합니다. 나는이 PHP에 croppie js의 출력을 전달하고 싶다.croppie js를 사용하여 자른 이미지를 사용하여 PHP로 사용하는 방법은 무엇입니까?
<?php
# Check to see if the form has been submitted or not:
if(!isset($_POST['submit'])){
# Form has not been submitted, show our uploader form and stop the script
require_once("uploader.html");
exit();
}else{
# Form has been submitted, begin processing data
# Include the function file then call it with the uploaded picture:
# TIP: The "../../ portion is a relative path. You will need to change this
# path to fit your website's directory structure.
require_once('FacebookPicOverlay.php');
# Create the FacebookTagger object using our upload value given to us by uploader.html
$fbt = new FacebookPicOverlay();
# Let's say we're using this script to do an image overlay. Let's invoke the
# overlay method, which will then return the image file relative to the resources
# folder (ex: will return resources/processed/imagename.jpg).
try {
$image = $fbt->overlay($_FILES['picture_upload']);
}catch(Exception $e){
print("<b>Oops!</b> " . $e->getMessage());
print("<br /><br /><a href=\"javascript:history.go(-1)\">Please go back and try again</a>");
exit();
}
# This will delete all images created more than two days ago (by default).
# This is helpful in keeping our processed folder at a reasonable file size.
$fbt->maintenance();
require_once("success.html");
}
# That's all, folks!
?>
업 로더 양식으로 도와주세요. 감사합니다
어떤 형태와 거의 모든 코드가 없습니다 :이 방법과 주제에 대한
더. 자르기 후에는 데이터를 blob (canvas.getImageData'와 같이)으로 가져온 다음 php로 전달하여 처리 할 수 있습니까? 그게 다해야 할 일이지만, 실제로 제공되는 코드는 우리에게 아무 것도 알려주지 않습니다. – somethinghere