Search Results

Search found 510 results on 21 pages for 'bmp'.

Page 14/21 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • OpenCV - DLL missing, but it's not?

    - by charles-22
    I am trying just a basic program with OpenCV with the following code: #include "cv.h" #include "highgui.h" int main() { IplImage* newImg; newImg = cvLoadImage("~/apple.bmp", 1); cvNamedWindow("Window", 1); cvShowImage("Window", newImg); cvWaitKey(0); cvDestroyWindow("Window"); cvReleaseImage(&newImg); return 0; } When I run this, I get The program can't start because libcxcore200.dll is missing from your computer. Try reinstalling the program to fix this problem. However, I can see this DLL. It exists. I have added the following to the input dependencies for my linker C:\OpenCV2.0\lib\libcv200.dll.a C:\OpenCV2.0\lib\libcvaux200.dll.a C:\OpenCV2.0\lib\libcxcore200.dll.a C:\OpenCV2.0\lib\libhighgui200.dll.a What gives? I'm using visual studio 2008.

    Read the article

  • How to change default image of derived ToolStripButton?

    - by Special Touch
    It seems like a simple task. Create a C# class that derives from ToolStripButton. The derived ToolStripButton should behave exactly the same as the parent class in the designer and the application, except that the default image should be different. Surprisingly just changing the constructor is not sufficient: public CustomToolStripButton() { base.Image = (Image) new Bitmap(typeof(CustomToolStripButton), "CustomImage.bmp"); } When the ToolStripButton is displayed in the designer, the original default image is shown. There must be a simple solution. What could it be?

    Read the article

  • The second argument to copy() function cannot be a directory

    - by Jorm
    Anyone know why this: $title = trim($_POST['title']); $description = trim($_POST['description']); // Array of allowed image file formats $allowedExtensions = array('jpeg', 'jpg', 'jfif', 'png', 'gif', 'bmp'); foreach ($_FILES as $file) { if ($file['tmp_name'] > '') { if (!in_array(end(explode(".", strtolower($file['name']))), $allowedExtensions)) { echo '<div class="error">Invalid file type.</div>'; } } } if (strlen($title) < 3) echo '<div class="error">Too short title</div>'; else if (strlen($description) > 70) echo '<div class="error">Too long desccription.</div>'; else { move_uploaded_file($_FILES['userfile']['tmp_name'], 'c:\wamp\www\uploads\images/'); } Gives: Warning: move_uploaded_file() [function.move-uploaded-file]: The second argument to copy() function cannot be a directory in C:\wamp\www\upload.php on line 41 Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move 'C:\wamp\tmp\php1AB.tmp' to 'c:\wamp\www\uploads\images/' in C:\wamp\www\upload.php on line 41

    Read the article

  • Problem including dynamic image in Eclipse BIRT 2.5.0 report on Windows

    - by schmeedy
    I have a BIRT 2.5.0 report design with a dynamic image (URL is specified through report parameter, image formats tried - .png, .bmp). When running the report from our application on Ubuntu, everything renders OK. When doing exactly the same thing on Windows, there's following message instead of the actual image: Current report item is not supported in this report format. Same problem occurs when including image with a fixed URL - even though the image is displayed and loaded in the Report Designer, it's not rendered in report generated from our application. Again, this happens only on Windows. The only way I managed to get the image into a rendered report was through embedding it into the report design file, which is not suitable as the image has to be dynamic.

    Read the article

  • Convert BLOB to Jpg using C#

    - by TGuimond
    Hello, I am currently developing a web application that receives data from an on-site oracle database. The database developers have developed some web-services that I am able to call and send/receive data to and from the the database. When I want to display an image the method returns the image in BLOB format. My question is: what is the best way to convert BLOB to .jpg or .bmp so I can display the image correctly? If someone could point me in the right direction that would be great! Cheers, Tristan

    Read the article

  • Any Win32 APIs to get the screenshots?

    - by Microkernel
    Hi all, I am writing an app, which needs to take the screen shots automatically (just like pressing PrintScreen button). So please suggest me how to get this done. A raw 24 bit BMP image would suffice. PLEASE NOTE: My app is in C, so any win32 APIs that can be called from my code is what I am looking for. (Sometimes back I had got an example code from codeproject which used to get the screen shots but the mouse pointer user to blink when the screen shot is taken. As multiple shots are taken this looks irritating to the user, so I don't want the mouse pointer to blink!) Regards, Chethan KR

    Read the article

  • Bug when drawing a QImage on a widget with PIL and PyQt

    - by oulipo
    I'm trying to write a small graphic application, and I need to construct some image using PIL that I show in a widget. The image is correctly constructed (I can check with im.show()), I can convert it to a QImage, that I can save normally to disk (using QImage.save), but if I try to draw it directly on my QWidget, it only show a white square. Here I commented out the code that is not working (converting the Image into QImage then QPixmap result in a white square), and I made a dirty hack to save the image to a temporary file and load it directly in a QPixmap, which work but is not what I want to do https://gist.github.com/f6d479f286ad75bf72b7 Someone has an idea? If it can help, when I try to save my QImage in a BMP file, I can access its content, but if I try to save it to a PNG it is completely white

    Read the article

  • asp.net root paths

    - by dejavu
    I am getting the exception when trying to save a file: System.Web.HttpException: The SaveAs method is configured to require a rooted path, and the path '~/Thumbs/TestDoc2//small/ImageExtractStream.bmp' is not rooted. at System.Web.HttpPostedFile.SaveAs(String filename) at System.Web.HttpPostedFileWrapper.SaveAs(String filename) at PitchPortal.Core.Extensions.ThumbExtensions.SaveSmallThumb(Thumb image) in C:\Users\Bich Vu\Documents\Visual Studio 2008\Projects\PitchPortal\PitchPortal.Core\Extensions\ThumbExenstions.cs:line 23 the code is below: public static void SaveSmallThumb(this Thumb image) { var logger = Microsoft.Practices.ServiceLocation.ServiceLocator.Current.GetInstance<ILoggingService>(); string savedFileName = HttpContext.Current.Server.MapPath(Path.Combine( image.SmallThumbFolderPath, Path.GetFileName(image.PostedFile.FileName))); try { image.PostedFile.SaveAs(savedFileName); } catch (Exception ex) { logger.Log(ex.ToString()); } } I cant see what is wrong here, any tips?

    Read the article

  • getting window screenshot windows API

    - by Oliver
    Hi, I am trying to make a program to work on top of an existing GUI to annotate it and provide extra calculations and statistical information. I want to do this using image recognition, as I have learned a fair amount about this in University using Matlab and similar things. I can get a handle to the window I want to perform image recognition on, but I don't know how to turn that handle into an image of that window, and all its visible child windows. I suppose I am looking for something like the screenshot function, but restricted to a single window. How would I go about doing this? I suppose I'd need something like a .bmp to mess about with. Also, it would have to be efficient enough that I could call it several times a second without my PC grinding to a halt. Hopefully this isn't an obvious question, I typed some things into google but didn't get anything related.

    Read the article

  • Preserve time stamp when shrinking an image

    - by Ckhrysze
    My digital camera takes pictures with a very high resolution, and I have a PIL script to shrink them to 800x600 (or 600x800). However, it would be nice for the resultant file to retain the original timestamp. I noticed in the docs that I can use a File object instead of a name in PIL's image save method, but I don't know if that will help or not. My code is basically name, ext = os.path.splitext(filename) # open an image file (.bmp,.jpg,.png,.gif) you have in the working folder image = Image.open(filename) width = 800 height = 600 w, h = image.size if h > w: width = 600 height = 800 name = name + ".jpg" shunken = image.resize((width, height), Image.ANTIALIAS) shunken.save(name) Thank you for any help you can give!

    Read the article

  • Python: split a list based on a condition?

    - by Parand
    What's the best way, both aesthetically and from a performance perspective, to split a list of items into multiple lists based on a conditional? The equivalent of: good = [x for x in mylist if x in goodvals] bad = [x for x in mylist if x not in goodvals] is there a more elegant way to do this? Update: here's the actual use case, to better explain what I'm trying to do: # files looks like: [ ('file1.jpg', 33L, '.jpg'), ('file2.avi', 999L, '.avi'), ... ] IMAGE_TYPES = ('.jpg','.jpeg','.gif','.bmp','.png') images = [f for f in files if f[2].lower() in IMAGE_TYPES] anims = [f for f in files if f[2].lower() not in IMAGE_TYPES]

    Read the article

  • Windows Impersonation failed

    - by skprocks
    I am using following code to implement impersonation for the particular windows account,which is failing.Please help. using System.Security.Principal; using System.Runtime.InteropServices; public partial class Source_AddNewProduct : System.Web.UI.Page { [DllImport("advapi32.dll", SetLastError = true)] static extern bool LogonUser( string principal, string authority, string password, LogonSessionType logonType, LogonProvider logonProvider, out IntPtr token); [DllImport("kernel32.dll", SetLastError = true)] static extern bool CloseHandle(IntPtr handle); enum LogonSessionType : uint { Interactive = 2, Network, Batch, Service, NetworkCleartext = 8, NewCredentials } enum LogonProvider : uint { Default = 0, // default for platform (use this!) WinNT35, // sends smoke signals to authority WinNT40, // uses NTLM WinNT50 // negotiates Kerb or NTLM } //impersonation is used when user tries to upload an image to a network drive protected void btnPrimaryPicUpload_Click1(object sender, EventArgs e) { try { string mDocumentExt = string.Empty; string mDocumentName = string.Empty; HttpPostedFile mUserPostedFile = null; HttpFileCollection mUploadedFiles = null; string xmlPath = string.Empty; FileStream fs = null; StreamReader file; string modify; mUploadedFiles = HttpContext.Current.Request.Files; mUserPostedFile = mUploadedFiles[0]; if (mUserPostedFile.ContentLength >= 0 && Path.GetFileName(mUserPostedFile.FileName) != "") { mDocumentName = Path.GetFileName(mUserPostedFile.FileName); mDocumentExt = Path.GetExtension(mDocumentName); mDocumentExt = mDocumentExt.ToLower(); if (mDocumentExt != ".jpg" && mDocumentExt != ".JPG" && mDocumentExt != ".gif" && mDocumentExt != ".GIF" && mDocumentExt != ".jpeg" && mDocumentExt != ".JPEG" && mDocumentExt != ".tiff" && mDocumentExt != ".TIFF" && mDocumentExt != ".png" && mDocumentExt != ".PNG" && mDocumentExt != ".raw" && mDocumentExt != ".RAW" && mDocumentExt != ".bmp" && mDocumentExt != ".BMP" && mDocumentExt != ".TIF" && mDocumentExt != ".tif") { Page.RegisterStartupScript("select", "<script language=" + Convert.ToChar(34) + "VBScript" + Convert.ToChar(34) + "> MsgBox " + Convert.ToChar(34) + "Please upload valid picture file format" + Convert.ToChar(34) + " , " + Convert.ToChar(34) + "64" + Convert.ToChar(34) + " , " + Convert.ToChar(34) + "WFISware" + Convert.ToChar(34) + "</script>"); } else { int intDocLen = mUserPostedFile.ContentLength; byte[] imageBytes = new byte[intDocLen]; mUserPostedFile.InputStream.Read(imageBytes, 0, mUserPostedFile.ContentLength); //xmlPath = @ConfigurationManager.AppSettings["ImagePath"].ToString(); xmlPath = Server.MapPath("./../ProductImages/"); mDocumentName = Guid.NewGuid().ToString().Replace("-", "") + System.IO.Path.GetExtension(mUserPostedFile.FileName); //if (System.IO.Path.GetExtension(mUserPostedFile.FileName) == ".jpg") //{ //} //if (System.IO.Path.GetExtension(mUserPostedFile.FileName) == ".gif") //{ //} mUserPostedFile.SaveAs(xmlPath + mDocumentName); //Remove commenting till upto stmt xmlPath = "./../ProductImages/"; to implement impersonation byte[] bytContent; IntPtr token = IntPtr.Zero; WindowsImpersonationContext impersonatedUser = null; try { // Note: Credentials should be encrypted in configuration file bool result = LogonUser(ConfigurationManager.AppSettings["ServiceAccount"].ToString(), "ad-ent", ConfigurationManager.AppSettings["ServiceAccountPassword"].ToString(), LogonSessionType.Network, LogonProvider.Default, out token); if (result) { WindowsIdentity id = new WindowsIdentity(token); // Begin impersonation impersonatedUser = id.Impersonate(); mUserPostedFile.SaveAs(xmlPath + mDocumentName); } else { throw new Exception("Identity impersonation has failed."); } } catch { throw; } finally { // Stop impersonation and revert to the process identity if (impersonatedUser != null) impersonatedUser.Undo(); // Free the token if (token != IntPtr.Zero) CloseHandle(token); } xmlPath = "./../ProductImages/"; xmlPath = xmlPath + mDocumentName; string o_image = xmlPath; //For impersoantion uncomment this line and comment next line //string o_image = "../ProductImages/" + mDocumentName; ViewState["masterImage"] = o_image; //fs = new FileStream(xmlPath, FileMode.Open, FileAccess.Read); //file = new StreamReader(fs, Encoding.UTF8); //modify = file.ReadToEnd(); //file.Close(); //commented by saurabh kumar 28may'09 imgImage.Visible = true; imgImage.ImageUrl = ViewState["masterImage"].ToString(); img_Label1.Visible = false; } //e.Values["TemplateContent"] = modify; //e.Values["TemplateName"] = mDocumentName.Replace(".xml", ""); } } catch (Exception ex) { ExceptionUtil.UI(ex); Response.Redirect("errorpage.aspx"); } } } The code on execution throws system.invalidoperation exception.I have provided full control to destination folder to the windows service account that i am impersonating.

    Read the article

  • Image bit depth values.

    - by pencilslate
    REPHRASED QUESTION: I am coming up with a list of possible image bit depth values that could be used as a predefined reference list in my application. I could think of 8,16,24 and 32 bit depths. The image formats considered are BMP, JPEG, PNG and GIF. I understand the bit depth decides the quality and thereby the storage requirements for the image. The application is used to store user uploaded images(non-medical, non-DICOM). Are there more bit depths other than the ones mentioned above that i should be including in my list? Are there any stats on the usage of the images with bit depths? Appreciate your response!

    Read the article

  • Optimize php-fpm and varnish for a powerfull server

    - by Jim
    My setup is: Intel® Core™ i7-2600 and RAM 16 GB DDR3 RAM varnish+nginx+php-fpm+apc for a not very heavy WordPress blog with W3 Total Cache and CDN My problem is that after 55 hits per second according to blitz.io varnish starts giving out timeouts. CPU usage at this time is hardly 1%. Free memory at all time remains 10GB+. I tried benchmarking php-fpm directly with result of 150hits/s without any timeouts. But after that the CPU usage goes 100% and it stops responding. Can you help me optimize it to handle more? As i understand nginx has nothing to do over here so i dont put its config. php-fpm config listen = /tmp/php5-fpm.sock listen.allowed_clients = 127.0.0.1 user = nginx group = nginx pm = dynamic pm.max_children = 150 pm.start_servers = 7 pm.min_spare_servers = 2 pm.max_spare_servers = 15 pm.max_requests = 500 slowlog = /var/log/php-fpm/www-slow.log php_admin_value[error_log] = /var/log/php-fpm/www-error.log php_admin_flag[log_errors] = on apc extension = apc.so apc.enabled=1 apc.shm_size=512MB apc.num_files_hint=0 apc.user_entries_hint=0 apc.ttl=7200 apc.use_request_time=1 apc.user_ttl=7200 apc.gc_ttl=3600 apc.cache_by_default=1 apc.filters apc.mmap_file_mask=/tmp/apc.XXXXXX apc.file_update_protection=2 apc.enable_cli=0 apc.max_file_size=1M apc.stat=1 apc.stat_ctime=0 apc.canonicalize=0 apc.write_lock=1 apc.report_autofilter=0 apc.rfc1867=0 apc.rfc1867_prefix =upload_ apc.rfc1867_name=APC_UPLOAD_PROGRESS apc.rfc1867_freq=0 apc.rfc1867_ttl=3600 apc.include_once_override=0 apc.lazy_classes=0 apc.lazy_functions=0 apc.coredump_unmap=0 apc.file_md5=0 apc.preload_path Varnish VCL backend default { .host = "127.0.0.1"; .port = "8080"; .connect_timeout = 6s; .first_byte_timeout = 6s; .between_bytes_timeout = 60s; } acl purgehosts { "localhost"; "127.0.0.1"; } # Called after a document has been successfully retrieved from the backend. sub vcl_fetch { # Uncomment to make the default cache "time to live" is 5 minutes, handy # but it may cache stale pages unless purged. (TODO) # By default Varnish will use the headers sent to it by Apache (the backend server) # to figure out the correct TTL. # WP Super Cache sends a TTL of 3 seconds, set in wp-content/cache/.htaccess set beresp.ttl = 24h; # Strip cookies for static files and set a long cache expiry time. if (req.url ~ "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$") { unset beresp.http.set-cookie; set beresp.ttl = 24h; } # If WordPress cookies found then page is not cacheable if (req.http.Cookie ~"(wp-postpass|wordpress_logged_in|comment_author_)") { # set beresp.cacheable = false;#versions less than 3 #beresp.ttl>0 is cacheable so 0 will not be cached set beresp.ttl = 0s; } else { #set beresp.cacheable = true; set beresp.ttl=24h;#cache for 24hrs } # Varnish determined the object was not cacheable #if ttl is not > 0 seconds then it is cachebale if (!beresp.ttl > 0s) { # set beresp.http.X-Cacheable = "NO:Not Cacheable"; } else if ( req.http.Cookie ~"(wp-postpass|wordpress_logged_in|comment_author_)" ) { # You don't wish to cache content for logged in users set beresp.http.X-Cacheable = "NO:Got Session"; return(hit_for_pass); #previously just pass but changed in v3+ } else if ( beresp.http.Cache-Control ~ "private") { # You are respecting the Cache-Control=private header from the backend set beresp.http.X-Cacheable = "NO:Cache-Control=private"; return(hit_for_pass); } else if ( beresp.ttl < 1s ) { # You are extending the lifetime of the object artificially set beresp.ttl = 300s; set beresp.grace = 300s; set beresp.http.X-Cacheable = "YES:Forced"; } else { # Varnish determined the object was cacheable set beresp.http.X-Cacheable = "YES"; if (beresp.status == 404 || beresp.status >= 500) { set beresp.ttl = 0s; } # Deliver the content return(deliver); } sub vcl_hash { # Each cached page has to be identified by a key that unlocks it. # Add the browser cookie only if a WordPress cookie found. if ( req.http.Cookie ~"(wp-postpass|wordpress_logged_in|comment_author_)" ) { #set req.hash += req.http.Cookie; hash_data(req.http.Cookie); } } # vcl_recv is called whenever a request is received sub vcl_recv { # remove ?ver=xxxxx strings from urls so css and js files are cached. # Watch out when upgrading WordPress, need to restart Varnish or flush cache. set req.url = regsub(req.url, "\?ver=.*$", ""); # Remove "replytocom" from requests to make caching better. set req.url = regsub(req.url, "\?replytocom=.*$", ""); remove req.http.X-Forwarded-For; set req.http.X-Forwarded-For = client.ip; # Exclude this site because it breaks if cached if ( req.http.host == "sr.ituts.gr" ) { return( pass ); } # Serve objects up to 2 minutes past their expiry if the backend is slow to respond. set req.grace = 120s; # Strip cookies for static files: if (req.url ~ "\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$") { unset req.http.Cookie; return(lookup); } # Remove has_js and Google Analytics __* cookies. set req.http.Cookie = regsuball(req.http.Cookie, "(^|;\s*)(__[a-z]+|has_js)=[^;]*", ""); # Remove a ";" prefix, if present. set req.http.Cookie = regsub(req.http.Cookie, "^;\s*", ""); # Remove empty cookies. if (req.http.Cookie ~ "^\s*$") { unset req.http.Cookie; } if (req.request == "PURGE") { if (!client.ip ~ purgehosts) { error 405 "Not allowed."; } #previous version ban() was purge() ban("req.url ~ " + req.url + " && req.http.host == " + req.http.host); error 200 "Purged."; } # Pass anything other than GET and HEAD directly. if (req.request != "GET" && req.request != "HEAD") { return( pass ); } /* We only deal with GET and HEAD by default */ # remove cookies for comments cookie to make caching better. set req.http.cookie = regsub(req.http.cookie, "1231111111111111122222222333333=[^;]+(; )?", ""); # never cache the admin pages, or the server-status page, or your feed? you may want to..i don't if (req.request == "GET" && (req.url ~ "(wp-admin|bb-admin|server-status|feed)")) { return(pipe); } # don't cache authenticated sessions if (req.http.Cookie && req.http.Cookie ~ "(wordpress_|PHPSESSID)") { return(lookup); } # don't cache ajax requests if(req.http.X-Requested-With == "XMLHttpRequest" || req.url ~ "nocache" || req.url ~ "(control.php|wp-comments-post.php|wp-login.php|bb-login.php|bb-reset-password.php|register.php)") { return (pass); } return( lookup ); } Varnish Daemon options DAEMON_OPTS="-a :80 \ -T 127.0.0.1:6082 \ -f /etc/varnish/ituts.vcl \ -u varnish -g varnish \ -S /etc/varnish/secret \ -p thread_pool_add_delay=2 \ -p thread_pools=8 \ -p thread_pool_min=100 \ -p thread_pool_max=1000 \ -p session_linger=50 \ -p session_max=150000 \ -p sess_workspace=262144 \ -s malloc,5G" Im not sure where to start, should i for start optimize php-fpm and then go to varnish or php-fpm is at its max right now so i should start looking for the problem in varnish?

    Read the article

  • C/C++ Allegro program causes Windows 7 to switch to Aero Basic

    - by Matt H
    Hi SO, I'm just trying out the allegro library, and here is the code which I've got so far: #include <allegro.h> int main(int argc, char *argv[]) { allegro_init(); // initialize the allegro libraries install_keyboard(); // initialize keyboard functions set_color_depth(16); // set the color depth set_gfx_mode(GFX_AUTODETECT_WINDOWED, 640, 480, 0, 0); // set up 640*480px window BITMAP *pic = NULL; pic = load_bitmap("C:/picture.bmp", NULL); // load the picture blit(pic, screen, 0, 0, 0, 0, 1000, 1000); readkey(); destroy_bitmap(pic); return 0; } END_OF_MAIN() It works fine, but when I run it, while the program's window is open, Windows 7 changes the theme from Aero to Aero basic. If you aren't sure what I mean, this pops up (I got this from Google, which is why it says Vista rather than Windows 7): 1) Why? 2) How can I ensure that this doesn't happen?

    Read the article

  • extend web server to serve static files

    - by Turtle
    Hello, I want to extend a web server which is only able to handle RPC handling now. The web server is written in C#. It provides a abstract handler function like following: public string owsHandler(string request, string path, string param, OSHttpRequest httpRequest, OSHttpResponse httpResponse) And I wrote following code to handle image files: Bitmap queryImg = new Bitmap(path); System.IO.MemoryStream stream = new System.IO.MemoryStream(); queryImg.Save(stream, System.Drawing.Imaging.ImageFormat.Bmp); queryImg.Dispose(); byte[] byteImage = stream.ToArray(); stream.Dispose(); return Convert.ToBase64String(byteImage); And I test it in the browser, the image is returned but the image dimension info is missed. Shall I add something more to the code? Or is any general way to server static files? I do not want to serve it in a ASP.net server. Thanks

    Read the article

  • Creating avatar from uploaded image

    - by mamu
    We are using asp.net with .net 4.0 We want to allow users to upload any image and we want to create tiny avatar for uploaded image? What is the best way to convert uploaded images for avatar? We want to keep the same height width ratio if we can convert gif, bmp, jpg, png to one standard format it would be greate. Which could be the best format to convert it to? i think converting gif would be best option. am i correct? any open source option i can look at

    Read the article

  • What is the best algorithm to locate a point in an image file?

    - by suugaku
    Hi all, I want to create a mark sheet recognizer. Here is the description: My system uses black and white color scheme. The mark sheet paper has a small black rectangle on each corner and an additional small black rectangle, to determine orientation, near one of the previous rectangles. The paper is scanned to yield an image (in bmp format for example). The first step is to locate these five references in image as eficient as possible. My rough idea is to trace row by row and from left to right for each row. It sounds very slow I think. Is there any better way to do that? Thank you in advance. regards, Suugaku

    Read the article

  • Why is my image being displayed larger?

    - by bsh152s
    I'm trying to display an image on a splash screen and it's being stretched upon display. The image I'm trying to display is a simple bmp file. Any ideas why? In SplashWindow.xaml: <Window ... SizeToContent="WidthAndHeight"> <Grid> ... <Image Grid.Row="0" Source="{Binding SplashImage}"></Image> </Grid> </Window> In SplashViewModel.cs public ImageSource SplashImage { get { return ImageUtilities.GetImageSource(_splashImageFilenameString); } } From ImageUtilities.cs public static ImageSource GetImageSource(string imageFilename) { BitmapFrame bitmapFrame = null; if(!string.IsNullOrEmpty(imageFilename)) { if(File.Exists(imageFilename)) { bitmapFrame = BitmapFrame.Create(new Uri(imageFilename)); } else { Debug.Assert(false, "File " + imageFilename + " does not exist."); } } return bitmapFrame; }

    Read the article

  • convert int to string for use in allegro function

    - by ace
    I am trying to run the following code using allegro. textout_ex(screen, font, numbComments , 100, 100, GREEN, BLACK); numbComments is an integer, the function prototype of this function is void textout_ex(BITMAP *bmp, const FONT *f, const char *s, int x, int y, int color, int bg); and i cannot, according to my understanding pass this integer in the third position. I therefore need to convert the integer into a string. I did it like this, but it didnt work. Help please? int score = numbComments; string Str; stringstream out; // YOU MUST INCLUDE <sstream> FOR THIS. out << score; Str = out.str(); and then tried to use the string Str, which didnt work

    Read the article

  • How do I register multiple paths for a HttpHandler in IIS7?

    - by Daniel T.
    I have a HttpHandler that resizes images based on the querystring, so requesting something like: http://server/image.jpg?width=320&height=240 will give you a resized image that's 320x240. In the IIS Manager, under Handler Mappings, I mapped my handler's path as *.jpg,*.gif,*.bmp,*.png. However, this doesn't activate the handler. If I change it to just *.jpg, then it works. My question is, do I have to create 4 separate mapping entries, one for each image type, or is there some way to combine multiple extensions in one path?

    Read the article

  • How to create curved Text on a Bitmap?

    - by TooFat
    I am currently dynamically creating a bitmap and using the graphics object from the string from the bitmap to Draw a string on it like so. System.Drawing.Graphics graph = System.Drawing.Graphics.FromImage(bmp); graph.DrawString(text, font, brush, new System.Drawing.Point(0, 0)); This returns a rectangle shaped bitmap with the string written straight across from left to right. I would like to also be able to draw the string in the shape of a rainbow. How can I do this?

    Read the article

  • Load resources? - wxPython / Python

    - by Francisco Aleixo
    Hello everyone. I am using wxPython and Py2exe to create my application and my only problem is loading for example bitmaps. Ok so lets say I want to add an image to my application, and thats fairly easy using wxPython, and lets say it is on the same directory of my .py so for example: image = wx.StaticBitmap(self, -1, wx.Bitmap('image.bmp') Now, this works obviously fine, problem is when I convert to Py2exe, I would like to use the resources from the dlls that I included in the Py2Exe compilation. So basically what I want to do is to instead of including the images on the same folder as my application in order to work, I would like to use it from the resources so people won't see the images on the folder.

    Read the article

  • Images saved with D3DXSaveSurfaceToFile will open in Paint, not Photoshop

    - by bsruth
    I'm using D3DXSaveSurfaceToFile to save windowed Direct3D 9 surfaces to PNG, BMP and JPG files. There are no errors returned from the D3DXSaveSurfaceToFile call and all files open fine in Windows Photo Viewer and Paint. But they will not open in a higher end image editing program such as Paint Shop Pro or Photoshop. The error messages from these programs basically say that the file is corrupted. If I open the files in Paint and then save them in the same file format with a different file name, then they'll open fine in the other programs. This leads me to believe that D3DXSaveSurfaceToFile is writing out non-standard versions of these file formats. Is there some way I can get this function to write out files that can be opened in programs like Photoshop without the intermediate step of resaving the files in Paint? Or is there another function I should be using that does a better job of saving a Direct3D surfaces to an image?

    Read the article

  • run program multiple times using one line shell command

    - by teehoo
    I have the following gifs on my linux system: $ find . -name *.gif ./gifs/02.gif17.gif ./gifs/fit_logo_en.gif ./gifs/halloween_eyes_63.gif ./gifs/importing-pcs.gif ./gifs/portal.gif ./gifs/Sunflower_as_gif_small.gif ./gifs/weird.gif ./gifs2/00p5dr69.gif ./gifs2/iss013e48788.gif ...and so on What I have written is a program that converts GIF files to BMP with the following interface: ./gif2bmp -i inputfile -o outputfile My question is, is it possible to write a one line command using xargs, awk, find etc. to run my program once for each one of these files? Or do I have to write a shell script with a loop?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >