how do I remove write-protection from a Google Cloud Platform Compute Engine image? - virtual-machine

I've opened my first Compute Engine VM (Linux in this case), added what I need (applications for instance), and created an Image from it.
I can then use that Image to spin up other VMs.
However the files I've put in the image then seem to be write-protected, and I can't alter them. How do I remove this write-protection?
If that's not possible, how can I change the image?

I don't think there is a direct way to access the custom image and modifying it without connecting to the VM-Instance. As per my understanding you can attach the custom image to the new VM-instance, modify that image further as per your requirements and then make another image and assign it another version number . Please see the link-1 for Setting image versions in an image family.

Related

Cloudinary upload image widget does not work as expected

I am using the upload image widget without success.
1) result.info.path returns invalid url.
2) There is no preview of the uploaded images due to no.1
3) No images are were uploaded to my media folder at Cloudinary.
Fiddle:
https://jsfiddle.net/7uqb83t1/
These are my preset settings:
Can someone share a working version of this widget + preset settings?
On successful upload, you need to check result.info.secure_url for a link to the asset. Currently, in your preset, you're using Async which means the incoming transformation is performed in the background (asynchronously), and as such, you will get a pending result. Async assumes you're using a Notification URL as a webhook where you'll receive the Upload API response when the processing is complete. In your case, I'd recommend turning the Async off.
Also, your incoming transformation configured in the preset is not valid and because of that, you will be getting an error on upload. Please console.log this in your JSFiddle to see it. Essentially, it'll be -
Auto gravity can only be used with crop, fill, lfill, fill_pad or
thumb
'auto' gravity (g_auto) implies cropping (automatically selecting the most interesting part of the image to focus on) and therefore you need to use an appropriate crop mode. 'scale' keeps all image data and no cropping is made so that is why g_auto can't work with it. Please see the following section of the documentation for details on the different crop modes - https://cloudinary.com/documentation/image_transformation_reference#crop_parameter - which will help you decide which one you want to use.
Lastly, you should also consider updating your incoming transformation so that it only resizes once, since currently, resizing it three times with the same crop mode is redundant. For example, you can use c_scale,q_auto,w_687 only, or if you want with 'auto' gravity you can try c_fill,g_auto,q_auto,w_687.

Upload same image in different sizes - Dropzonejs

There is any possibility to upload a file with different sizes in DropzoneJs?
I'm using vue-dropzone which is made with dropzonejs and i have to upload the same file with different sizing for srcset.
Example:
I want to upload the file test.png which is 1000x500 px. There is any possibility to upload it at the same time in original resolution and also in 500x250px?
Image resizing in the browser has been a seat-of-the pants experience for a long time. Web assemblies are the way of the future for processing-intensive tasks in web apps. I came across this project the other day. It looks fantastic and I really can't wait to strip out our home-baked image resizing with canvas and replace it with this.
The usual reason for doing this is to avoid large uploads. It's a little bit weird to want to resize in the browser then upload the original. You might be better resizing on the server. You'll save bandwidth and the server libraries will be more mature than what's available on the client.
Along with the original image object you can add one more your custom resized image to the array of images by using resize config of dropzone. You can do the above on drop event or adddedFile event of dropzone.

May I embed images as data URI with Windows 8/10 toast notifications?

I'm trying to write an application that offers toast notifications on Windows 8 and newer.
Is it possible instead of referencing an image file on the local disk to use data URIs in order to display an image via the XML that one passes to show the toast? I was unable to come up with any documentation so far and I am still in the research phase for my project (so no code to "simply" try, yet).
No. DataUris are not supported for images in toasts (or tiles)
Update/documentation/proof:
For 8
From https://msdn.microsoft.com/en-us/library/windows/apps/hh761494.aspx
In this set of templates, the image element is expressed using one of
these protocols:
•http:// or https:// A web-based image.
•ms-appx:/// An image included in the app package.
•ms-appdata:///local/ An image saved to local storage.
•file:/// A local image. (Only supported for desktop apps.)
And for 10
From https://msdn.microsoft.com/en-us/library/windows/apps/br230844.aspx
The URI of the image source, using one of these protocol handlers:
•http:// or https:// A web-based image.
•ms-appx:/// An image included in the app package.
•ms-appdata:///local/ An image saved to local storage.
•file:/// A local image. (Supported only for desktop apps. This protocol cannot be used by Windows Store apps.)
Bonus, on WP 8.X you couldn't even specify the image, it just used the app icon.

How can I use code-generated images on my WinRT live tile?

I'm trying to create live tiles in my app by using BitmapRender (in Windows 8.1) to create an image from a user control, which I then want to add as my live tile image.
Creating the image works perfectly, and I store it in the app's roaming folder. However, I can't get the image to add to the live tile when created this way. The odd thing is that if I copy my generated file into the project and then try to attach it to the live tile it works (so the image must be correctly formatted/size, etc.); and if I copy a random image into my roaming folder and set that as the live tile image it also works (meaning I am able to use a file in the roaming folder to set the tile image)...so that means I am referencing the file location correctly, and the image itself is capable of being used on a live tile...so why doesn't it work?
I have created a sample project (link below) that illustrates that my live tile creating code works (with an image stored in the project), and also that I can successfully create an image from a UI control and store it in the roaming folder (FWIW I've tried using different folders with no change in behaviour).
Is there something I'm missing? Any insight or help would be greatly appreciated.
Project is in VB.net, but I can figure out answers in C# if that's easier.
Sample project to illustrate the issue
The trouble is that you're attempting to use an absolute file path to reference the image, which is not supported. If you look in the tile schema, specifically at the page for the element, you'll see that the src must be an URI using http[s]://, ms-appx:///, or ms-appdata:///local for Windows Store apps. The fact that you can use a relative in-package path of /livetile.png is a bit of a fluke, as that's defaulting to ms-appx:///livetile.png.
What you need to do, then, is just use this for a filepath:
filepath = "ms-appdata:///local/livetile.png"
I tried this in your sample and it worked fine. Do note that only the local folder is supported here, not roaming. This is primarily because roaming appdata is limited to 100K to begin with, and dropping tile images in there would often quickly fill your quota. You'll want to then generate the image locally on each device (which would make sense also because you can then take the current scaling into account).

Download images from an external source iOS

Is it possible to download images from a web server and save them in such a way that
[UIImage imageNamed:#"filename"]
would still work for filename.png and filename#2x.png just as if they had been sent along in the application package all along?
Adding my comment as an answer. You can try to send the scale based on retina/non-retina and then download a single image based on that. You dont need to worry about combining two images and downloading since a device can be either retina or non-retina only. You dont need both images at the same time.
You can download the images based on retina/non-retina of the device itself. No need to keep both in the same device.
As you are considering downloading both images, so bandwidth per se is not of concern, why not combine the two images into a multi-resolution TIFF and download that from the web server? If you do that and load the image from the file the correct resolution will be picked automatically.