Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function grayscale() {
- $('#progress').show();
- $.ajax({
- type: 'POST',
- url: 'function/grayscale.php',
- data: {
- r: JSON.stringify(edited.r),
- g: JSON.stringify(edited.g),
- b: JSON.stringify(edited.b),
- width: edited.width,
- height: edited.height
- },
- success: function(data) {
- data = JSON.parse(data);
- $('#edit-image').attr('src', data.base64);
- $('#progress').hide();
- edited.r = data.r;
- edited.g = data.g;
- edited.b = data.b;
- edited.width = parseInt(data.width);
- edited.height = parseInt(data.height);
- },
- async: false
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement