FileNotFoundException when cropping a photo
By : user2032715
Date : March 29 2020, 07:55 AM
wish help you to fix your issue getFilesDir() return your application's privte directory. Camera can't access your private directory. To make wallpaper.jpg accessible by Camera place it in some publix folder. For example like Alex said it can be sd card root. The fixed code would be: code :
File file = new File(Environment.getExternalStorageDirectory(), "wallpaper.jpg");
|
Cropping a photo using only JavaScript which accepts a URL as input
By : user2604693
Date : March 29 2020, 07:55 AM
|
error facing while cropping photo using Paperclip in Rails 3
By : Shail882
Date : March 29 2020, 07:55 AM
seems to work fine I'm pretty sure you are running into the same issue that I initially had, whereby the reprocess! method was saving the ActiveRecord parent, which was then trigging the after_update callback, which resulted in your reprocess_photo method being called again. The end result is a somewhat recursive loop that won't stop until your machine runs out allocatable memory. The easy fix for this is add a boolean attribute called processing which will allow you to determine whether or not we're already reprocessing the image. code :
attr_accessor :processing
def reprocess_photo
# don't crop if the user isn't updating the photo
# ...or if the photo is already being processed
return unless (cropping? && !processing)
self.processing = true
photo.reprocess!
self.processing = false
end
|
Cropping a photo
By : mcfield
Date : March 29 2020, 07:55 AM
this will help You can include the img in a div, set that div to overflow: hidden and height: 100px, and the img to margin-top: -133px code :
<div id="cropimage">
<img src="whatever" alt="whatever">
</div>
#cropimage { overflow: hidden; height: 100px }
#cropimage img { width: 240px; height: 366px; margin-top: -133px }
|
Always Null returned after cropping a photo from a Uri in Android Lollipop?
By : Kristoff De Troyer
Date : March 29 2020, 07:55 AM
This might help you I think that your problem has nothing to do with Android version but the image you want to be cropped. Cropping image processed in class com.android.gallery3d.filtershow.crop.CropActivity#BitmapIOTask. When the image is too large to return, it will try to return the thumb of the image, and will return null sometimes. To avoid this, you can get the uri of cropped image instead of bitmap by setting intent.putExtra(MediaStore.EXTRA_OUTPUT, tmpUri); where tmpUri is an uri created to hold the result. And then you can get the bitmap from tmpUri. Sample code:
|