Search Results

Search found 21488 results on 860 pages for 'image conversion'.

Page 27/860 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Interface (contract), Generics (universality), and extension methods (ease of use). Is it a right design?

    - by Saeed Neamati
    I'm trying to design a simple conversion framework based on these requirements: All developers should follow a predefined set of rules to convert from the source entity to the target entity Some overall policies should be able to be applied in a central place, without interference with developers' code Both the creation of converters and usage of converter classes should be easy To solve these problems in C# language, A thought came to my mind. I'm writing it here, though it doesn't compile at all. But let's assume that C# compiles this code: I'll create a generic interface called IConverter public interface IConverter<TSource, TTarget> where TSource : class, new() where TTarget : class, new() { TTarget Convert(TSource source); List<TTarget> Convert(List<TSource> sourceItems); } Developers would implement this interface to create converters. For example: public class PhoneToCommunicationChannelConverter : IConverter<Phone, CommunicationChannle> { public CommunicationChannel Convert(Phone phone) { // conversion logic } public List<CommunicationChannel> Convert(List<Phone> phones) { // conversion logic } } And to make the usage of this conversion class easier, imagine that we add static and this keywords to methods to turn them into Extension Methods, and use them this way: List<Phone> phones = GetPhones(); List<CommunicationChannel> channels = phones.Convert(); However, this doesn't even compile. With those requirements, I can think of some other designs, but they each lack an aspect. Either the implementation would become more difficult or chaotic and out of control, or the usage would become truly hard. Is this design right at all? What alternatives I might have to achieve those requirements?

    Read the article

  • Conversion of DVC-PRO HD 1080, any free tool?

    - by Andrea Ambu
    Is there any free (as in beer, and if it's possible as in bird) tool to convert a dvd in the format DVC-PRO HD 1080 to a normal/standard dvd format so that I can play it on a normal DVD player? EDIT: I changed the wording a bit. We've a video in DVC-PRO HD 1080 but as far as I know it is a proprietary format. We'd like to create a standard dvd out of it. I'm not really in video encoding and dvd conversion. I thought I need to be more precise. VLC currently doesn't support DVC-PRO HD 1080.

    Read the article

  • running chkdsk /F on a large mounted NTFS image file gets BSOD (Windows Vista)

    - by Citizentools
    Using ddrescue, I've created ISO files from the C: and D: drives on my Windows XP laptop's harddisk (after the laptop stopped booting and chkdsk etc. wouldn't fix it). I was able to mount the 60 GB D.iso file use OSFmount, and successfully recreated the D: drive on another laptop. The C.iso image is more problematic. ddrescue left about 3mb unrecovered of 85 GB total, after multiple passes (no big worries about this) and I'm able to mount it with OSFmount on a Windows Vista laptop. However, when I run chkdsk /F /V on the mounted drive (which was mounted as H:), I consistently get a blue screen (BSOD). CHKDSK makes it through the first three passes, including index fixing and security descriptor fixes, without errors, but triggers a BSOD when it attempts to fix the volume records or bitmap If I attempt to fix the drive by clicking on Properties-Tools-Error checking-Check Now-Automatically fix file system errors, I get an alert box reading "WIndows was unable to complete the disk check." I'd try a tool other than OSFMount, but it's the only thing I've found so far that will mount large ISO files, and it has worked for me up to now in this process. [Update 2011-11-13 18:41 EST] Just ran the same process using the original Windows XP laptop, with a different internal drive, and chkdsk worked like a champ. So the question is still interesting, but decidedly less urgent.

    Read the article

  • Conversion of DVC-PRO HD 1080, any free tool?

    - by Andrea Ambu
    Is there any free (as in beer, and if it's possible as in bird) tool to convert a dvd in the format DVC-PRO HD 1080 to a normal/standard dvd format so that I can play it on a normal DVD player? EDIT: I changed the wording a bit. We've a video in DVC-PRO HD 1080 but as far as I know it is a proprietary format. We'd like to create a standard dvd out of it. I'm not really in video encoding and dvd conversion. I thought I need to be more precise. VLC currently doesn't support DVC-PRO HD 1080.

    Read the article

  • Stretch and Scale a CSS image Background - With CSS only

    - by Fábio Antunes
    Good day. I always wanted to do this. I want that my background image stretch and scale depending the Browser view port size. I've seen some questions on SO that do the job, this One for example. Works well, but i want place the img in the background way, not with a image tag. In that one is placed a img tag, then with CSS we tribute to the img tag. width:100%; height:100%; It works, but that question is a bit old, and states that in CSS3 resizing a background image will work pretty well. I've tried this example the first one but i didn't workout for me. Does somebody know a good method to do it with the background image statement? If its sounds confusing just ask. Thanks

    Read the article

  • Android - Read PNG image without alpha and decode as ARGB_8888 Android

    - by loki666
    I try to read an image from sdcard (in emulator) and then create a Bitmap image with the "BitmapFactory.decodeByteArray" method. I set the options: options.inPrefferedConfig = Bitmap.Config.ARGB_8888 options.inDither = false Then I extract the pixels into a ByteBuffer. ByteBuffer buffer = ByteBuffer.allocateDirect(width*height*4) bitmap.copyPixelsToBuffer(buffer) I use this ByteBuffer then in the JNI to convert it into RGB format and want to calculate on it. But always I get false data - I test without modifying the ByteBuffer. Only thing I do is to put it into the native method into JNI. Then cast it into a unsigned char* and convert it back into a ByteBuffer before returning it back to Java. Before displaying the image I get data back with bitmap.copyPixelsFromBuffer( buffer ) But then it has wrong data in it. My Question is if this is because the image is internally converted into RGB 565 or what is wrong here? May anybody has an idea, it would be great!

    Read the article

  • using grails and google app engine to store image as blob and the view dynamically

    - by mswallace
    I am trying to dynamically display an image that I am storing in the google datastore as a Blob. I am not getting any errors but I am getting a broken image on the page that I view. Any help would be awesome! I have the following code in my grails app domain class has the following @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) Long id @Persistent String siteName @Persistent String url @Persistent Blob img @Persistent String yourName @Persistent String yourURL @Persistent Date date static constraints = { id( visible:false) } My save method in the controller has this def save = { params.img = new Blob(params.imgfile.getBytes()) def siteInfoInstance = new SiteInfo(params) if(!siteInfoInstance.hasErrors() ) { try{ persistenceManager.makePersistent(siteInfoInstance) } finally{ flash.message = "SiteInfo ${siteInfoInstance.id} created" redirect(action:show,id:siteInfoInstance.id) } } render(view:'create',model:[siteInfoInstance:siteInfoInstance]) } My view has the following <img src="${createLink(controller:'siteInfoController', action:'showImage', id:fieldValue(bean:siteInfoInstance, field:'id'))}"></img> and the method in my controller that it is calling to display a link to the image looks like this def showImage = { def site = SiteInfo.get(params.id)// get the record response.outputStream << site.img // write the image to the outputstream response.outputStream.flush() }

    Read the article

  • How to make non-blurry image in WPF 3d

    - by terenf
    I used Viewport3D and ModelVisual3D to create a simple rectangle with an image (I tried it with JPG, PNG), but it shows the image blurry, but the original image is very sharp and clear. I don't know how to make it with the original quality in 3D... I also tried some 2D solutions like RenderOptions.BitmapScalingMode and SnapsToDevicePixels but they do not seem to not work in the 3D case. Has anyone encountered this problem or know the solution?

    Read the article

  • How can I pad an image with CodeIgniter?

    - by Shamoon
    My user is uploading an image of any size XX x YY. I want to find the larger dimension and shrink the image to a square of 250x250 with transparent padding being added to make up the difference. Is there any way to accomplish this with CI's Image Lib?

    Read the article

  • Display Image over map layer in GeoServer

    - by iririr
    Hi I am newbie when it comes to GeoServer and trying to figure out if there is an easy way to display images on top of map layer. A background: In my application, based on a search criteria, some polygons are drawn on the map. Each polygon has a corresponding image (in TIFF format) that is stored somewhere. I want to load the image on top of the map when the user zooms in to a certain zoom level. I know this can be done using openLayers but since my images are in TIFF format, (openLayers is not able to render TIFF images as far as i know) i have to convert them to .PNG first which would be very slow considering the number of images i have. Hence I was wondering whether it would be possible to create a image layer that would retrieve an image of a certain polygon at a certain zoom level. If so, could anyone point me to an example or give me an idea on whether this is possible. I am using spring 2.5, tomcat 5, java 1.6 and geoserver 2.0 Thanks.

    Read the article

  • Image cropping in PHP is producing blank result

    - by thinkswan
    I'm simply trying to crop a JPEG image (no scaling) using PHP. Here is my function, along with the inputs. function cropPicture($imageLoc, $width, $height, $x1, $y1) { $newImage = imagecreatetruecolor($width, $height); $source = imagecreatefromjpeg($imageLoc); imagecopyresampled($newImage,$source,0,0,$x1,$y1,$width,$height,$width,$height); imagejpeg($newImage,$imageLoc,90); } When I call it as follows--cropPicture('image.jpg', 300, 300, 0, 0)--the function completes properly, but I'm left with a black image that is 300x300 px (in other words, a blank canvas). Am I passing in the wrong arguments? The image exists and is writeable.

    Read the article

  • Load external image inside flash movie clip

    - by PepeSanchez
    I have a flash movie clip and need to load an external image inside the clip that reference to an external URL.. like www.myimage.com/image.jpg i did something with XML but the image persist on every clip because it loads from actionscript using the x and y cords. Help needed! Thanks!

    Read the article

  • How to set android lock screen image

    - by robintw
    Hi, I'm just getting started with android programming, and want to see if there is a way to programmatically set the lock screen image. I've found various ways of setting the wallpaper in the API, but I can't seem to find the equivalent ways of setting the lock screen image. I've seen various posts saying that customising the lock screen by adding widgets or bits of applications is not possible, but surely there must be a way to set the image programmatically? Cheers, Robin

    Read the article

  • Android Image Orientation Issue on Motorola Droid

    - by roundhill
    Hi there, Our app uses the gallery pick action to grab an image from the device to upload to a new blog post. We're seeing on the Moto Droid that images taken in portrait are being sent back to the app in landscape orientation so the image is sideways. AFAIK this only occurs on the Droid. Found this via google, but we need the full size image to be uploaded in the correct orientation so the solution doesn't work for us: http://groups.google.com/group/android-developers/browse_frm/thread/1246475fd4c3fdb6?pli=1 An easy way to reproduce this is to take a picture in portrait on the Droid, then send it to yourself via Gmail. In the email message, the image will be in landscape (sideways). I've tested on the droid 2.1 update and the issue is still there.

    Read the article

  • How to deal with background image orientation in UIView

    - by docchang
    I'm using setting the background image using methodology below. When I rotate my device the background repeats, which make sense because it is not an image. How do I deal with orientation change if this is the way I'm setting my background image? - (void)viewDidLoad { [super viewDidLoad]; UIColor *background = [[UIColor alloc] initWithPatternImage:[UIImage imageNamed:@"background.png"]]; self.view.backgroundColor = background; [background release]; }

    Read the article

  • [jQuery] [PHP] Image manipulation

    - by robertdd
    hello, I want to do some kind of image editor, after I upload more images i want to make a list with all the thumbnails! after i want to be able to click on one thumb and rotate, duplicate, drag and drop (to change positions of the images), delete the image! all the images i want to be in a php array, if a image is deleted i want to delete the row from array to, if a image is drag and droped i want to change the position in the array to! ok after the user upload all the images and modify some of it how i can make a DONE button to save the positions of the images? for this small project how u suggest me to save the images? (to make a table in mysql and store the names of the images in the database depending on the session id? depending on the IP? any suggestions are welcome! thanks!

    Read the article

  • Fast Remote PHP Technique To Detect Image 404

    - by Volomike
    What PHP script technique runs the fastest in detecting if a remote image does not exist before I include the image? I mean, I don't want to download all the bytes of the remote image -- just enough to detect if it exists. And while on the subject but with just a slight deviation, I'd like to download just enough bytes to determine a JPEG's width and height information. Speed is very important in my concern here on this system design I'm working on.

    Read the article

  • php gd image quality

    - by apueee
    I 'm trying to add text on a specific image. Its working perfectly but the quality of image is low especially for papyrus.ttf font. How can i improve the quality of text in the image. But i need high quality to print the output. Here is my code.. its very simple. header("Content-Type: image/jpeg"); $im = imagecreatefromjpeg("cosmos.jpg"); $black = ImageColorAllocate($im, 0, 0, 0); Imagettftext($im, 14, 0, 10, 15, $black, 'papyrus.ttf', "Corey and Lisa "); Imagettftext($im, 14, 0, 10, 35, $black, 'papyrus.ttf', " 1994, june"); Imagejpeg($im, '', 100); ImageDestroy($im); Download: http://wneeds.com/gdtest.zip

    Read the article

  • SSRS Broken Embedded Image

    - by CodeGrue
    I have a SQL Server Reporting Services report with an embedded image in the header. It works fine in preview mode and if I inspect the RDL file, it has the encoded image stream in there. However, when I deploy the report to the server and view the report in the Report Manager, the image shows with a broken X icon. Has anyone experienced this?

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >