Search Results

Search found 350 results on 14 pages for 'crop'.

Page 4/14 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How can I crop every page of a large PDF file?

    - by Andrew
    I have a 1300 page PDF file of a scanned book that was unfortunately not cropped when scanned. The actual book page dimensions are around 6x9", but each scanned page is 8.5x11", the size of the scanner bed. For much smaller PDF files I could throw it into Photoshop and crop the page, but this is a huge file. What is the best way to losslessly crop all of the pages of the file, in either Windows or OS X?

    Read the article

  • Android: Using MediaRecorder to crop an existing audio file?

    - by user141146
    Hi, I'd like to take an existing mp3 file located on an SD card and arbitrarily crop it (e.g. crop from 0:12 to 1:14 in a 3 minute song). The only class that I've seen that seems remotely relevant to do this is the MediaRecorder class. My 'hope' would be to "record" an existing file like this: MediaRecorder recorder = new MediaRecorder(); recorder.setAudioSource(###some magical way of specifying an existing file??###); But this obviously doesn't work (setAudioSource() takes an int and seems to default to the phone's microphone). Is there a class or an approach that can be used to crop audio on the phone itself? TKS!!

    Read the article

  • How do you crop a specific area with paperclip in Rails (3)?

    - by Smickie
    Hi, I have paperclip in Rails (3) working with simple cropping, for example the blow code makes a simple crop of the thumbnail: has_attached_file :image, :styles => { :thumb => "90x90#" }, :default_style => :thumb However I was wondering how do you crop a very specific area of an image; lets say you have an x and y coordinate to start from and then a width and height of the crop. How do you go about passing a complex style like this in? Thanks very much.

    Read the article

  • How to crop black bars or zoom on Youtube and other Video websites?

    - by cloneman
    Many desktop software (VLC, MPC) and have an option to 'zoom in' , 'crop black bars', or crop to a specific aspect ratio. How can we do this in Fullscreen on Youtube or other flash Video sites? I am the viewer, NOT the video's creator/publisher. iOS Can do this (double tap to zoom, which removes black bars, zoom depth not configurable). afaik, Desktop computers (and android devices), cannot do this on the fly. The only 'workaround' I've found is F11 and zooming of the entire web page - basically a fake full screen and zooming the web page beyond the screen size. Use Case: watching 4:3 flash videos from the web on a widescreen monitor. Looking for all creative solutions, including any software that accesses YouTube without using a web browser.

    Read the article

  • How to crop or get a smaller size UIImage in iPhone without memory leaks?

    - by rkbang
    Hello all, I am using a navigation controller in which I push a tableview Controller as follows: TableView *Controller = [[TableView alloc] initWithStyle:UITableViewStylePlain]; [self.navigationController pushViewController:Controller animated:NO]; [Controller release]; In this table view I am using following two methods to display images: - (UIImage*) getSmallImage:(UIImage*) img { CGSize size = img.size; CGFloat ratio = 0; if (size.width < size.height) { ratio = 36 / size.width; } else { ratio = 36 / size.height; } CGRect rect = CGRectMake(0.0, 0.0, ratio * size.width, ratio * size.height); UIGraphicsBeginImageContext(rect.size); [img drawInRect:rect]; return UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); } - (UIImage*)imageByCropping:(UIImage *)imageToCrop toRect:(CGRect)rect { //create a context to do our clipping in UIGraphicsBeginImageContext(rect.size); CGContextRef currentContext = UIGraphicsGetCurrentContext(); //create a rect with the size we want to crop the image to //the X and Y here are zero so we start at the beginning of our //newly created context CGFloat X = (imageToCrop.size.width - rect.size.width)/2; CGFloat Y = (imageToCrop.size.height - rect.size.height)/2; CGRect clippedRect = CGRectMake(X, Y, rect.size.width, rect.size.height); //CGContextClipToRect( currentContext, clippedRect); //create a rect equivalent to the full size of the image //offset the rect by the X and Y we want to start the crop //from in order to cut off anything before them CGRect drawRect = CGRectMake(0, 0, imageToCrop.size.width, imageToCrop.size.height); CGContextTranslateCTM(currentContext, 0.0, drawRect.size.height); CGContextScaleCTM(currentContext, 1.0, -1.0); //draw the image to our clipped context using our offset rect //CGContextDrawImage(currentContext, drawRect, imageToCrop.CGImage); CGImageRef tmp = CGImageCreateWithImageInRect(imageToCrop.CGImage, clippedRect); //pull the image from our cropped context UIImage *cropped = [UIImage imageWithCGImage:tmp];//UIGraphicsGetImageFromCurrentImageContext(); CGImageRelease(tmp); //pop the context to get back to the default UIGraphicsEndImageContext(); //Note: this is autoreleased*/ return cropped; } But when I pop the Controller, the memory being used is not released. Is there any leaks in the above code used to create and crop images. Also are there any efficient method to deal with images in iPhone. I am having a lot of images and facing major challeges in resolving the memory issues. tnx in advance.

    Read the article

  • How can I deskew and crop PDFs made from scanned pages *automatically*? [closed]

    - by Pietro M.
    I have several PDFs made up of book pages' scans. The scans are made from two pages at a time and some of these scans are skewed, making text appear slightly tilted. I'm looking for a tool that could allow me to do an automatic optimization by deskewing the scans without losing readability. I've found the GPL software briss to crop the scans in order to have a 1:1 page ratio instead of 2:1, but I don't have any tool to deskew the pages. I stumbled upon unpaper, another open source tool that seems perfect for what I want to do, but that tool is Linux only and it doesn't work on PDF files directly. Any hint is appreciated.

    Read the article

  • what's the correct way to crop art when saving for web in Adobe Illustrator?

    - by jela
    I need to save a bunch of illustrations for web use, and I cannot find any 'crop to art dimensions' option when saving them. I've therefore been creating a new artboard for each illustration by clicking on the art with the artboard tool, then deleting the old artboard. This works OK except the new artboard ignores the stroke, so I then have to go back and tweak all the edges of the artboard before saving, or else the stroke edges get cut off. This gets old after hundreds of illustrations. Is there an easier way to do it?

    Read the article

  • Android OpenGL es "glDrawTexfOES" draws upside down

    - by Alle
    I'm using OpenGL for Android to draw my 2D images. Whenever I draw something using the code: gl.glViewport(aspectRatioOffset, 0, screenWidth, screenHeight); gl.glMatrixMode(GL10.GL_PROJECTION); gl.glLoadIdentity(); GLU.gluOrtho2D(gl, aspectRatioOffset, screenWidth + aspectRatioOffset,screenHeight, 0); gl.glMatrixMode(GL10.GL_MODELVIEW); gl.glLoadIdentity(); gl.glEnable(GL10.GL_TEXTURE_2D); gl.glBindTexture(GL10.GL_TEXTURE_2D, myScene.neededGraphics.get(ID).get(animationID).get(animationIndex)); crop[0] = 0; crop[1] = 0; crop[2] = width; crop[3] = height; ((GL11Ext)gl).glDrawTexfOES(x, y, z, width, height) I get an upside down result. I'v seen people solve this through doing: crop[0] = 0; crop[1] = height; crop[2] = width; crop[3] = -height; This does however hurt the logic in my application, so I would like the result to not be flipped upside down. Does anyone know why it happen, and any way of avoiding or solving it?

    Read the article

  • I want to crop an image, draw a smaller size image without caching the images.... What is the best w

    - by rkbang
    Hello all, I am storing the images in database. I get the NSData and create an image from it. Now I want to crop or draw a smaller image of the existing image in database which I am getting from the querry. I dont want to cache the images since I am using them in bulk and want to release them as soon as the view being displayed where the images are used is popped up. Is there any efficient solution to make sure that images dont consume memory at the background once their use is over... I will appreciate the lines of code for this. Tnx in advance.

    Read the article

  • Simple image editor to select area of image as wallpaper

    - by Kevin
    I've spent way to many hours looking for software to do the following simple task, so now I'll ask. I need software that will open an image and put a 'crop box' on it. You can set the 'crop box' to standard screen resolutions (1024x768) or define a custom one. You can move the 'crop box' around on the image to select the area you want. You can re-size the 'crop box' (selecting a corner and dragging w/mouse) and it maintains the correct aspect ratio. You can save the area in the 'crop box' to use as the Windows background. (The software doesn't need to set it as the background, I can do that myself in Windows XP.) The free software sites (CNET.com, etc.) have lots of image editing software that do things much more complicated than this simple task. I've spent too many hours downloading them to see if they will do this particular task. The ones I've tried would require manual trial and error to get the part of an image that I want saved as an image, with the correct aspect ratio so Windows doesn't screw with it (stretch, tile, crop) when I select it as the wallpaper.

    Read the article

  • How to configure mspaint on Windows Server 2008R2/ Win 7 to start up with 1-pixel canvas or auto-crop a pasted image?

    - by Fantomas
    I do a lot of screen print capturing, and I have just figured out how to use AutoHotKey to paste screen prints into MsPaint automatically. How to paste Print Screen on MS Paint automatically when press "PrtSc" button ? However, one small problem I have is that ... if I grabbed a screen with Alt-Prt Scr that is only 50x50 pixels, then there would be extra white margin around it, because MSPaint starts out with a larger canvas by default. How can I make it ALWAYS start with 1x1 instead?

    Read the article

  • To decide where to crop an image, how can I highlight it's most compressible areas?

    - by Umber Ferrule
    I'm looking to get the most compression out of each of the most popular image formats, such as, JPEG, PNG, GIF, etc. Ideally, this would be a tool, or a series of transforms that could be performed (perhaps using a macro and then discarded) in popular image editors (Paint.NET/PaintShopPro/PhotoShop/GIMP) to highlight areas which will compress less. Alternatively, what rules of thumb can be used other than reducing colours (for PNG/GIF), reducing image dimensions, avoiding high detail areas... I'm not asking for help deciding what format to use for a particular image type as I think this is fairly common knowledge, i.e. diagram and images with few colours = PNG/GIF, photographs = JPEG.

    Read the article

  • ImageMagick bash script issue

    - by gAMBOOKa
    // This works convert ${path}${dst} -crop ${crop} ${path}${dst} // but when changed to this, it fails convert ${path}${src} -trim ${path}${dst} convert ${path}${dst} -crop ${crop} ${path}"pdf_"${dst} What am I doing wrong?

    Read the article

  • Flash AS3: crop TextField content off at X lines, add '...' at the end

    - by matt lohkamp
    There's only room for three lines of text in the interface, but the content is external and variable, and if it ends up taking up more than three lines, there needs to be some sort of 'view all' button functionality. I can kind of think about what that function needs to look like, but I'm not quite sure what the best way to do it in AS3 would be. Something like (in pseudo code): function cropText(source:TextField, length:int, append:String):TextField{ if(source.lineCount > length){ source.text = // magic function that retuns the first length lines, // minus append.length characters, with the append value tacked onto the end } return source; } ... right? How would you fill in the missing bit?

    Read the article

  • Navigation to call action for bean class

    - by Muthu
    I am using JSF 2.0 and PrimeFaces 3.0. I have uploaded the images and have to crop the image. The images are uploaded and successfully displayed in the upload pages. When I select the images and click the crop button the corresponding crop bean is not called. If I don't select the image and click the crop button the corresponding crop bean class is called but a NullPointerException occurred. What is the problem? The Facelet view is: <h:form> <p:panel header="FILE UPLOAD WITH CROPPER" style="width:900px; margin: 0 auto; margin-top:0px"> <p:fileUpload fileUploadListener="#{photoUploadAction.handleImageUpload}" mode="advanced" update="getImageId,messages" auto="false" allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/> <p:growl id="messages" showDetail="true"/> <p:growl id="uploadMessages" showSummary="true" showDetail="true"/> <h:panelGrid columns="2" > <p:imageCropper value="#{photoUploadAction.croppedImage}" id="getImageId" image="images/#{photoUploadVO.imageName}"/> </h:panelGrid> <p:commandButton value="Crop" update="getImageId" action="#{imageCropperBean.crop}" /> </p:panel> </h:form> BACKING BEAN for ImageCropper: @ManagedBean(name="imageCrop") @RequestScoped public class ImageCropperBean { private CroppedImage croppedImage; private String newFileName; private String imageName; public String getImageName() { return imageName; } public void setImageName(String imageName) { System.out.println("TEH IMAGE NAME ===="+imageName); this.imageName = imageName; } public String getNewFileName() { return newFileName; } public void setNewFileName(String newFileName) { System.out.println("AAAAAAAAAAAAAA"+this.newFileName); this.newFileName = newFileName; } public CroppedImage getCroppedImage() { return croppedImage; } public void setCroppedImage(CroppedImage croppedImage) { System.out.println("cRRRRRRRRRRRRR"+croppedImage); this.croppedImage = croppedImage; } public ImageCropperBean(){ } public String crop() { System.out.println("WELCOMEMMMMMMMMMMMMMM"); FacesContext context = FacesContext.getCurrentInstance(); ImageCropperBean imageCropperBean = (ImageCropperBean) context.getApplication().evaluateExpressionGet(context, "#{imageCropperBean}", ImageCropperBean.class); ServletContext servletContext = (ServletContext) FacesContext.getCurrentInstance().getExternalContext().getContext(); newFileName = servletContext.getRealPath("") + File.separator + "cropImage" + File.separator+ "croppedImage.jpg"; System.out.println("FILE NAME NAME NAME NAME "+newFileName); String file = new File(newFileName).getName(); System.out.println("DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD"+file); imageCropperBean.setImageName(file); File fileFolder = new File("e:/Mecherie_project/image_web/WebContent/cropImages",file); System.out.println("FILE ANE"+file); // String target=null; FileImageOutputStream imageOutput; try { imageOutput = new FileImageOutputStream(fileFolder); System.out.println("HHHHHHHHHH=="+imageOutput); imageOutput.write(croppedImage.getBytes(), 0, croppedImage.getBytes().length); imageOutput.close(); FacesMessage msg = new FacesMessage("Succesful", file + " is cropped."); FacesContext.getCurrentInstance().addMessage(null, msg); } catch (FileNotFoundException e) { FacesMessage error = new FacesMessage(FacesMessage.SEVERITY_ERROR, "The files were not Cropped!", ""); FacesContext.getCurrentInstance().addMessage(null, error); e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); FacesMessage error = new FacesMessage(FacesMessage.SEVERITY_ERROR, "The files were not Cropped!", ""); FacesContext.getCurrentInstance().addMessage(null, error); } // System.out.println("ghfhgfghgh"+target); return "success"; } }

    Read the article

  • Cropping a line (laser beam) in XNA

    - by electroflame
    I have a laser sprite that I wish to crop. I want to crop it so when it collides with an item, I can calculate the distance between the starting point, and the ending point, and only draw that. This eliminates the "overdraw" of a laser drawing past an item. Essentially, I'm trying to crop a line, but also keep that line "attached" to the nose of my ship. The line should not be drawn past the nose of my ship, that should be the starting point. There is no rotation to worry about. Currently, I thought that doing this through SpriteBatch would be best. This is my current Spritebatch code: spriteBatch.Draw(Laser.sprite, new Rectangle((int)Laser.position.X, (int)Laser.position.Y, Laser.sprite.Width, LaserHeight), new Rectangle(0, 0, (int)(Laser.sprite.Width), LaserHeight), new Color(255, 255, 255, (byte)MathHelper.Clamp(Laser.Alpha, 0, 255)), Laser.rotation, new Vector2(Laser.sprite.Width/2, LaserHeight/2), SpriteEffects.None, 0); But this doesn't quite work. It does only draw part of the sprite, but when LaserHeight is incremented, it lengthens the line in both ways! I believe this is due to some stupid error on my part with the Origin of the draw. Quick recap: I need to have my laser sprite drawn with the bottom of it at the nose of my ship, and then use LaserHeight to crop the image so only part of it is drawn. I have a feeling my explanation is a bit...lacking. So if you require more information, please say so and I will try to provide more information. Thanks in advance!

    Read the article

  • UIImage cropping on user selected rectangle in iphone?

    - by Rajendra Bhole
    Hi, I developing an small application in which i want to crop the UIImage captured by imagePickerControllerSourceTypeOfCamera. The UIImage should crop by user selected crop area or cropped rectangle. That means first user capture the image from the camera.Then on captured image the user selected an rectangle having color gray.That image(image data) should crop from that gray colored rectangle. My under develop code is as follows. -(IBAction) getPhoto:(id)sender { UIImagePickerController* imagePickerController = [[UIImagePickerController alloc] init]; imagePickerController.delegate = self; if((UIButton *) sender == btnphotoAlbum) { imagePickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; } else { imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; } imagePickerController.allowsImageEditing = YES; //imagePickerController.toolbar.barStyle =UIBarStyleBlackOpaque; //UIToolbar *toolBar=[[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 20, 320)]; //imagePickerController. [self presentModalViewController:imagePickerController animated:YES]; } (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo { UIImage *selectedImage = image; UIImage *originalImage = [editingInfo objectForKey:@"UIImagePickerControllerOriginalImage"]; NSValue *cropRect = [editingInfo objectForKey:UIImagePickerControllerCropRect]; CGRect theRect = [cropRect CGRectValue]; //captureImage.image =[info objectForKey:@"UIImagePickerControllerOriginalImage"]; [picker dismissModalViewControllerAnimated:YES]; } How i crop the image?

    Read the article

  • opengl, Black lines in-between tiles

    - by MiJyn
    When its translated in an integral value (1,2,3, etc....), there are no black lines in-between the tiles, it looks fine. But when it's translated to a non-integral (1.1, 1.5, 1.67), there are small blackish lines between each tile (I'm imagining that it's due to subpixel rendering, right?) ... and it doesn't look pretty =P So... what should I do? This is my image-loading code, by the way: bool Image::load_opengl() { this->id = 0; glGenTextures(1, &this->id); this->bind(); // Parameters... TODO: Should we change this? glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, this->size.x, this->size.y, 0, GL_BGRA, GL_UNSIGNED_BYTE, (void*) FreeImage_GetBits(this->data)); this->unbind(); return true; } I've also tried using: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); and: glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); Here is my image drawing code: void Image::draw(Pos pos, CROP crop, SCALE scale) { if (!this->loaded || this->id == 0) { return; } // Start position & size Pos s_p; Pos s_s; // End size Pos e_s; if (crop.active) { s_p = crop.pos / this->size; s_s = crop.size / this->size; //debug("%f %f", s_s.x, s_s.y); s_s = s_s + s_p; s_s.clamp(1); //debug("%f %f", s_s.x, s_s.y); } else { s_s = 1; } if (scale.active) { e_s = scale.size; } else if (crop.active) { e_s = crop.size; } else { e_s = this->size; } // FIXME: Is this okay? s_p.y = 1 - s_p.y; s_s.y = 1 - s_s.y; // TODO: Make this use VAO/VBO's!! glPushMatrix(); glTranslate(pos.x, pos.y, 0); this->bind(); glBegin(GL_QUADS); glTexCoord2(s_p.x, s_p.y); glVertex2(0, 0); glTexCoord2(s_s.x, s_p.y); glVertex2(e_s.x, 0); glTexCoord2(s_s.x, s_s.y); glVertex2(e_s.x, e_s.y); glTexCoord2(s_p.x, s_s.y); glVertex2(0, e_s.y); glEnd(); this->unbind(); glPopMatrix(); } OpenGL Initialization code: void game__gl_init() { glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluOrtho2D(0.0, config.window.size.x, config.window.size.y, 0.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glDisable(GL_DEPTH_TEST); glEnable(GL_BLEND); glEnable(GL_TEXTURE_2D); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } Screenshots of the issue:

    Read the article

  • Django gives "I/O operation on closed file" error when reading from a saved ImageField

    - by Rob Osborne
    I have a model with two image fields, a source image and a thumbnail. When I update the new source image, save it and then try to read the source image to crop/scale it to a thumbnail I get an "I/O operation on closed file" error from PIL. If I update the source image, don't save the source image, and then try to read the source image to crop/scale, I get an "attempting to read from closed file" error from PIL. In both cases the source image is actually saved and available in later request/response loops. If I don't crop/scale in a single request/response loop but instead upload on one page and then crop/scale in another page this all works fine. This seems to be a cached buffer being reused some how, either by PIL or by the Django file storage. Any ideas on how to make an ImageField readable after saving?

    Read the article

  • Permission errors when cropping after taking a photo

    - by CGM
    Hello everybody, I want to take a photo with an Intent on android.provider.MediaStore.ACTION_IMAGE_CAPTURE, next crop the result with: Intent intent = new Intent("com.android.camera.action.CROP"); intent.setClassName("com.android.camera", "com.android.camera.CropImage"); I follow the sugestions made at: Android: Crop an Image after Taking it With Camera with a Fixed Aspect Ratio However when calling the crop activity I get (already checked the LogCat output) a permission error, saying something like: Permission denial on a Intent to access the temporary image created by the camera activity on my SDcard. Can you please suggest a solution for Android 2.2 ? Thank you

    Read the article

  • How to convert all images to JPG format in PHP?

    - by SzamDev
    I am developing a website in PHP that let the user to upload images and then let him to decide how the image should be using jQuery - PHP integeration to select the area that wanted to be the picture and then click the crop button to crop it and save it. The problem that I am facing is that not all images type are good to crop and save so I noticed that the easy solution for it to convert the image to JPG and then let the user to crop it because it's the easy way to do it in JPG format. How I can do it? Is this the best solution for images types problem?

    Read the article

  • Imagemagick convert with resample option

    - by coneybeare
    I am creating thumbnails from much larger images and have been using this command successfully for some time: convert FILE -resize "64x" -crop "64x64+0+16" +repage -strip OUTFILE I also do some other processing that is not relevant to the question. I realized that this does not adjust the resolution at all, so if I use a 300dpi image, it ends up displaying really small on some devices. I want to resample it to 72x72 so I have been trying with this command: convert FILE -resize "64x" -crop "64x64+0+16" +repage -strip -resample 72x72 OUTFILE And expected the 64x64 image at 300dpi to be resampled to a 64x64 image at 72dpi, but instead, I am getting a very funny size and density. Here is "identify" output for the original and post-processed file WITHOUT the resample: coneybeare $ convert "aa.jpg" -crop "64x64+0+16" +repage -strip "aa.png" coneybeare $ for image in `find . -type f`; do identify $image; identify -verbose $image | egrep "^ Resolution"; done ./aa.jpg JPEG 1130x1695 1130x1695+0+0 8-bit DirectClass 1.492MiB 0.000u 0:00.000 Resolution: 300x300 ./aa.png PNG 64x64 64x64+0+0 8-bit DirectClass 7.46KiB 0.000u 0:00.000 Resolution: 118.11x118.11 And here is the "identify output for the command WITH the resample: coneybeare $ convert "aa.jpg" -crop "64x64+0+16" +repage -strip -resample 72x72 "aa.png" coneybeare $ for image in `find . -type f`; do identify $image; identify -verbose $image | egrep "^ Resolution"; done ./aa.jpg JPEG 1130x1695 1130x1695+0+0 8-bit DirectClass 1.492MiB 0.000u 0:00.000 Resolution: 300x300 ./aa.png PNG 15x15 15x15+0+0 8-bit DirectClass 901b 0.000u 0:00.000 Resolution: 28.34x28.34 So, the question is: What am I doing wrong and how can I fix it so the end result is a 64x64 cropped thumbnail image at 72dpi?

    Read the article

  • what free app can i use to resize an image to specific heigh x width?

    - by kacalapy
    I have an image that is huge and i want to re-size it down to 375 x 210 px to enter a competition. I would like to keep the aspect ratio of the image the same and not have to crop if I dont have to. i dont think my original image is the same ratio or proportions so i understand ill need to crop to get that in line but the rest should just be shrunk. that is to say i dont want to have to crop a small part of the image to meet the 375 x 210 px requirement.

    Read the article

  • How to keep source frame rate with mencoder/ffmpeg?

    - by Sandra
    I would like to crop and rotate a video, and then encode it to mp4 or mkv. mencoder video.mp4 -vf rotate=1,crop=720:1280:0:0 -oac pcm -ovc x264 -x264encopts preset=veryslow:tune=film:crf=15:frameref=15:fast_pskip=0:threads=auto -lavfopts format=matroska -o test.mkv But when I do the above encoding, the frame rate is way too fast. The encoding options were something I found, so I don't know if that is the problem. Question All I want is to crop and rotate the video, and keep the audio/video quality as good as possible. Have anyone tried this?

    Read the article

  • PHP resized image functions and S3 upload functions - but how to merge the two?

    - by chocolatecoco
    I am using S3 to store images and I am resizing and compressing images before it gets uploaded using PHP. I'm using this class for storing the images to an S3 bucket - http://undesigned.org.za/2007/10/22/amazon-s3-php-class This all works fine if I'm not doing any file processing before the file is uploaded because it reads the file upload from the $_FILES array. The problem is I am resizing and compressing the image before storing to the S3 bucket. So I'm no longer able to read from the $_FILES array. The functions for resizing: public function resizeImage($newWidth, $newHeight, $option="auto") { // *** Get optimal width and height - based on $option $optionArray = $this->getDimensions($newWidth, $newHeight, $option); $optimalWidth = $optionArray['optimalWidth']; $optimalHeight = $optionArray['optimalHeight']; // *** Resample - create image canvas of x, y size $this->imageResized = imagecreatetruecolor($optimalWidth, $optimalHeight); imagecopyresampled($this->imageResized, $this->image, 0, 0, 0, 0, $optimalWidth, $optimalHeight, $this->width, $this->height); // *** if option is 'crop', then crop too if ($option == 'crop') { $this->crop($optimalWidth, $optimalHeight, $newWidth, $newHeight); } } The script I am using to store the file after resizing and compressing to a local directory: public function saveImage($savePath, $imageQuality="100") { // *** Get extension $extension = strrchr($savePath, '.'); $extension = strtolower($extension); switch($extension) { case '.jpg': case '.jpeg': if (imagetypes() & IMG_JPG) { imagejpeg($this->imageResized, $savePath, $imageQuality); } break; case '.gif': if (imagetypes() & IMG_GIF) { imagegif($this->imageResized, $savePath); } break; case '.png': // *** Scale quality from 0-100 to 0-9 $scaleQuality = round(($imageQuality/100) * 9); // *** Invert quality setting as 0 is best, not 9 $invertScaleQuality = 9 - $scaleQuality; if (imagetypes() & IMG_PNG) { imagepng($this->imageResized, $savePath, $invertScaleQuality); } break; // ... etc default: // *** No extension - No save. break; } imagedestroy($this->imageResized); } with this PHP code to invoke it: $resizeObj = new resize("$images_dir/$filename"); $resizeObj -> resizeImage($thumbnail_width, $thumbnail_height, 'crop'); $resizeObj -> saveImage($images_dir."/tb_".$filename, 90); How do I modify the code above so I can pass it through this function: $s3->putObjectFile($thefile, "s3bucket", $s3directory, S3::ACL_PUBLIC_READ)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >